[转]Xcode中C++ Standard Library的选择
http://blog.csdn.net/tangaowen/article/details/8648990
如果你在 summary 中 的Deployment Target 中选择了4.3,而不是XCode默认的6.0,那么你在 混编C++的时候还可能会遇到另外一个错误:
clang: error: invalid deployment target for -stdlib=libc++ (requires iOS 5.0 or later)
clang failed with exit code 1
原因是 XCode 的 Build Setting中 的 C++ Standard Library默认选择了
libc++ (LLVM C++ standard library with c++11 support)选项,这个表示支持c++11的最新特新,
但是它只支持ios5以上,所以如果要使用这个选项,有两个选择:
第1个选择就是 将Deployment Target中 改为5.0以上,一般不会这样,因为我们一般想支持的sdk越低越好,尽量支持低版本的ios设备。
第2个选择就是 将这个 C++ Standard Library选项改为 libstdc++ (GNU c++ standard library ),它支持最低到4.3 .
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步