Xcode 11.1:找不到iostream'文件 [英] Xcode 11.1: iostream' file not found
问题描述
我刚刚将 MacBook Pro 更新为 macOS Catalina 10.15 ,并尝试编译并运行 C ++命令行程序,但是我已经以前版本中不存在的问题;
I just updated my MacBook Pro to macOS Catalina 10.15, and tried to compile and run a C++ command line program, but I had a problem which didn’t exist on previous versions;
这只是代码:
#include <iostream>
using namespace std;
int main()
{
cout << "Hello, World!\n";
return 0;
}
代码编译并输出预期的结果,但是Xcode仍然说:
The code compiles and outputs the expected, but still the Xcode says:
fatal error: 'iostream' file not found
我尝试将内部设置/C ++标准库更改为 libstdc ++ ,但警告提示:
I tried changing the Build Settings/C++ Standard Library to libstdc++, but a warning says:
warning: include path for stdlibc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead
并且同样的iostream错误仍然存在.
And the same iostream error still exists.
推荐答案
因此,我重新启动了笔记本电脑,现在一切似乎都很好,感谢那些尝试提供帮助的人.
So, I restarted my laptop and everything seems to be fine right now, thanks for those who tried to help.
这篇关于Xcode 11.1:找不到iostream'文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!