[cfe-dev] Adopting libc++, hitting problems on Mac OS X

David Chisnall David.Chisnall at cl.cam.ac.uk
Fri Sep 28 03:46:14 PDT 2012


On 28 Sep 2012, at 11:32, Dallman, John wrote:

> As best I understand it, you can't use both libc++ and libstdc++ in the same
> process

You understand incorrectly.  Libc++ is specifically designed so that you can use it in the same process as libstdc++.  What you can not do is use it interchangeably with libstdc++.  For example, if you define a function that takes a std::string, then you must pass it a std::string from the same STL that it was compiled with (libstdc++ or libc++).  Libc++ puts all of its code in a non-standard namespace and then imports it into the std namespace, so you will get a linker error if you try this.

David



More information about the cfe-dev mailing list