我在 eclipse 中构建了一个简单的程序:
#include <iostream>
using namespace std;
int main()
{
cout << "TEST" << endl;
return 0;
}
它在 Visual Studio 和 CodeBlocks 中工作,但 eclipse 表现得很奇怪。它说:
Unresolved inclusion: <iostream>
我在这里读到:C++ - 未解决的包含: https://stackoverflow.com/questions/10373788/c-unresolved-inclusion-iostream
和这里:Eclipse、Ubuntu 中未解析的 https://stackoverflow.com/questions/12335420/unresolved-iostream-in-eclipse-ubuntu
但他们都没有工作。
以下是截图project properties
:
edit:
我下载了MinGW http://sourceforge.net/projects/mingw/files/Installer/mingw-get-setup.exe/download现在我有这个Settings
:
我应该如何进行?
也许现在我不需要#include <iostream>
因为它现在包含在项目中?
I found iostream
under Includes
.
所以我尝试删除#include <iostream>
,但是当我尝试运行该程序时,我得到:Launch Failed. Binary not found.
error:
Thanks
edit:
好像如果我在其他程序(比如 CodeBlocks)中编译并创建exe
文件,然后eclipse
可以运行它。但它无法建立自己的exe
.
Why?