c++11

Hi
My MacOS doesn't support c++11,

What should I do to install it?

Thanks
If you're using the latest XCode, it should. It's just disabled by default.

If you're compiling from the command line, you'll need to add -std=c++11 to the list of arguments. You may also need to explicitly link against libc++.

Otherwise, as I haven't used the XCode IDE much, I can't much help you. Sorry.

-Albatross
Which versions of Mac OS X and XCode you are you running?

If you're using Mac OS X 10.9 or above, you will be running XCode 5.x so C++ 11 should be enabled by default (I'm running Mountain Lion 10.8 on this mac, 10.9 is on the other mac at work)
The Apple LLVM compiler's default C++ language dialect and standard library should be set to "Compiler Default" which you can check in your build settings under "Apple LLVM compiler 4.x - Language"

Otherwise, you must be using at least the 10.7 base sdk and have your "Compiler for C/C++/Objective-C" set to "Default Compiler (Apple LLVM compiler 4.x)"
Then set your C++ language dialect and standard library to -std=c++11 and libc++

If you don't see the options I've listed above in your build settings, either you have the wrong compiler selected or your OS X/XCode versions are too low.
Topic archived. No new replies allowed.