Cuda 6 on Mac OSX 10.9


Im currently developing under Mac OSX 10.9.2.

Cuda 6.0 supports Clang as a compiler. Clang uses libc++ as the default STL library by default.
There are two implementations of the standard C++ library available on OS X: libstdc++ and libc++. On 10.8 and earlier libstdc++ is chosen by default, on 10.9 libc++ is chosen by default.

The big issue I currently have is:
Cuda 6.0 is linked against libstdc++. Which means it can’t be used against code that uses libc++. So Im forced to use libstdc++, and cant use C++11 in my host code at the moment…

Are there any workarounds for this issue? Are there plans that Cuda compiles against libc++ in the near feature?


You might be able to use c++11 for host code only, but you have to make sure you don’t pass anything STL between the main part of your code compiled with nvcc and the rest, i.e. you can do a C-style interface with custom classes (none of those may contain anything STL though).

See also: