Should I use libc++ or libstdc++?

Loozie picture Loozie · Feb 20, 2013 · Viewed 55.2k times · Source

I am developing command line interface executables for both osx and linux using c/c++. The project will link against opencv. Should I use libc++ or libstdc++?

Answer

Jonathan Wakely picture Jonathan Wakely · May 28, 2013

I would use the native library for each OS i.e. libstdc++ on GNU/Linux and libc++ on Mac OS X.

libc++ is not 100% complete on GNU/Linux, and there's no real advantage to using it when libstdc++ is more complete. Also, if you want to link to any other libraries written in C++ they will almost certainly have been built with libstdc++ so you'll need to link with that too to use them.

More info here about the completeness of libc++ on various platforms.