[英]New C++ Project in Xcode 10.2 is not building
使用带有Xcode 10.2(10E125)的macOS Mojave 10.14.6
我只是以这种方式创建了新的c ++项目:
Xcode->新建项目->命令行工具-> [C ++语言]->下一步/完成
而且它根本没有构建。 我什至没有碰过代码。
这是错误
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/string.h:74:64: Use of undeclared identifier 'strchr'
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/string.h:81:75: Use of undeclared identifier 'strpbrk'
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/string.h:88:65: Use of undeclared identifier 'strrchr'; did you mean 'strchr'?
etc...
注意1:我尝试使用C语言创建相同的项目。 在我添加#include <vector>
之前,C Project运行良好。 使用vector时,与新C ++项目中的错误相同。
注意2:我认为系统上没有安装任何东西。 由于相同的代码在Objective-C项目中效果很好。 (而且我不想使用h + mm,我想使用hpp + cpp,如果是这样的话)
我有相同的设置,但对我而言却没有。 您是从一开始就安装XCode的,还是在完成几个项目之后发生的?
如果以后发生,我的理由是这样。 一旦我在XCode中使用了fix
按钮,但是它没有修复自己的代码,而是修改了系统头文件。 也许这也是您发生的事情?
在这种情况下,您需要重新安装整个聚会。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.