Using libstdc++ compiled libraries with clang++ -stdlib=libc++
问题 I am working in C++ under Mac OS X (10.8.2) and I recently came up with the need of using C++11 features, which are available through the clang++ compiler using the libc++ stdlib. However, I also need to use some legacy library compiled and linked against libstdc++ (coming from MacPorts). In doing so, I got linking errors, since the headers of the legacy libraries using, e.g., std::string , required to be resolved against the std::__1::basic_string (i.e., the libc++ implementation of std: