Xcode 4.3 and C++11 include paths

前端 未结 2 679
余生分开走
余生分开走 2020-12-07 23:06

I installed Xcode 4.3 and want to test this C++11 program:

#include 

int main()
{
}

However, it doesn\'t find the

2条回答
  •  盖世英雄少女心
    2020-12-07 23:31

    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)"

提交回复
热议问题