- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Is there a way to switch between libc++ and libstdc++ on Mac OS X 10.8 when icpc is used? The reason is pretty simple, libc++ includes the c++11 features and libstdc++ shiped with XCode is pretty old.
The clang compiler enables me to use shared_ptr without additional libraries like boost (command line: "clang++ -std=c++11 -stdlib=libc++"). In case of icpc, libstdc++ is always used, even if I use options "icpc -std=c++11 -use-clang-env". So I'm looking for an option like "-stdlib=libc++" of the clang compiler, which I did not find in the icpc manual.
I know, that I could also update the gnu compiler collection using mac ports. Still I would prefer to use the official mac os toolchain.
Any help would be appreciated.
Best regards,
Thomas
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I don't know when it was introduced, but there is an option for this on Mac now.
$ icpc -help | grep "\-stdlib=" -A3 -stdlib=<keyword> select the C++ library used for linking libstdc++ - links using the GNU libstdc++ library libc++ - links using the libc++ library (DEFAULT)

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page