How to compile a project with C++11 under Xcode 8?

后端 未结 2 692
借酒劲吻你
借酒劲吻你 2020-12-21 07:58

This question was asked many times and I failed to replicate all of the solutions I could find. I am unable to find this setting under File->Project Settings (as some sugges

2条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-21 08:28

    It's the same for 7 and 8. From the Project Navigator, select the project. In the main panel, at the top left, select the target. Now the main panel should have General, Resource Tags, Build Settings, Build Phases, & Build Rules along the top. Select Build Settings, select All. Scroll down to "Apple LLVM 8.0 Language C++" and expand it. Change "C++ Language Dialect" to "C++11 [-std=c++11]".

提交回复
热议问题