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

后端 未结 2 690
借酒劲吻你
借酒劲吻你 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:26

    Build Settings -> Linking-> other linker flags -> add to "-lc++"

    0 讨论(0)
  • 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]".

    0 讨论(0)
提交回复
热议问题