Hi
how/where to set -std=c++11 in xcode 4.6? My code compiles on Ubuntu/Eclipse with that and also on Win8.1 but I cannot find where
to set that in xcode.
Thanks
Hi
how/where to set -std=c++11 in xcode 4.6? My code compiles on Ubuntu/Eclipse with that and also on Win8.1 but I cannot find where
to set that in xcode.
Thanks
Not sure whether Xcode 4.6 already supports C++11; you should consider to switch to a 5.x version.
However, when you open the "Build Settings" for a target, then search for the fields "C++ Language Dialect" and then "C++ Standard Library" and pick the C++11 option that suit your needs. If the options do not provide some "C++11" and/or "GNU++11" stuff, then you need to upgrade Xcode, of course.
XCode supports C++11 just fine, you just have to find the proper switches. If you click on your target to get the build settings, select 'Levels' and look for the section named 'Apple LLVM 6.1 - Language - C++', under that you can change the Dialect to C++11 and then Standard Library to 'libc++'. Those two changes should take care of what you need. A note: the location may have changed since 4.6, I don't have that old of a machine to check exactly, but it was basically the same.