在Cocos2d-x的开发中,若是你使用的xcode4.6,有时候但愿使用C++11标准库的东西,好比 std::array,若是直接,c++
# include <array>
将会出现没法找到array的问题。xcode
这个时候咱们就要对咱们的xcode进行一下简单的配置。ide
在Building Settings里面,首先点击All, 而后在"Apple LLVM Compiler 4.2 - Language"区域:ui
更多详细,请参见screenshot. c++11
引用自stackoverflowcode
Howard Hinnant's answer (with corrections) is the correct answer for the command line. To use the new C++11 standard library inside of Xcode:开发
- In the Build Settings tab for your project, scroll down to "Apple LLVM Compiler 4.1 >- Language"
- Set the setting "C++ Language Dialect" to "C++11 [-std=c++11]"
- Set the setting "C++ Standard Library" to "libc++ (LLVM standard C++ library with C++11 support)"
参考连接: Xcode 4.3 and C++11 include pathsget