- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I have a lot of code and libraries on the mac that were built with libstdc++. I'm wondering if there is a way I can compile things to continue to use that version of the c runtime and yet use modern c++ features, in particular std::move. There doesn't seem to be any way to do this because the headers you get with you turn on -stdlib=libstdc++ are the apple headers that don't even have std::move.
Ultimately it seems like I'm going to need to switch to libc++ but I thought I would ask here if there was any way to get around this and use this newer c++ feature. I don't need initializer_list or variadic templates for instance.
thanks,
James
I have the latest Xcode 6 installed on Yosemite.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi James,
I talked to a developer in our engineering team. He suggested that the best option is to switch to default libc++. He would not recommend building newer GCC’s libstdc++ from MacPorts – it should be possible but we have never tested it.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi James,
Just to clarify Feilong's answer. libstdc++ on OS X is a bit old and doesn't support C++11 features. Also, we don't support MacPorts.Thus, the only solution is to use libc++ if you'd like to use C++11 features.
--Sergey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Sergey,
This makes sense to me I was just checking that I hadn't missed something. We have a lot of code compiled with libstdc++ and some other requirements to work as plugins to other applications that will be in the field for at least a couple of years. This makes it that much more difficult for us to adopt all the new compiler versions/features that we want to so I thought it worth posing the question.
Regards,
- James

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