I have problems with C ++ 11 in Xcode

I am a Mac OS X Lion user who uses Xcode for C ++, and it seems that there are no updates for Xcode. I can't seem to compile C ++ 11-exclusive code, but for some reason I thought Apple got C ++ 11. And yes, I have command line tool support.

And again, it can only be me. If so, is there any IDE that supports C ++ 11, or any way to upgrade?

+5
source share
3 answers

I use Xcode and set the following settings:

C ++ language dialect : C ++ 11 or GNU ++ 11

C ++ Standard Library : lib ++ (LLVM C ++ Standard Library with C ++ 11 Support)

Xcode Version: 4.3.2

Xcode project settings

+8

Xcode 4.3, , ++ 11. clang. -

GCC_VERSION = com.apple.compilers.llvm.clang.1_0

.xcconfig , .

LLVM, ++ :

CLANG_CXX_LANGUAGE_STANDARD = gnu++11

, , ..

, ++ 11 STL- (, std::unordered_map), lib++ STL:

CLANG_CXX_LIBRARY = libc++
+3

XCode 5/opencv 2.4.9 :

Xcode settings

And he builds without errors. If I install libC ++ without specifying the C ++ Language Dialect, I get the same problem as OP

0
source

All Articles