首页 > MinGW编译提示找不到iostream

MinGW编译提示找不到iostream

codeblocks + MinGW进行简单的C++程序开发。为了测试搭建平台是否完成,只写个HelloWorld来编译测试一下。

#include <iostream>

using namespace std;

int main()
{
    cout << "Hello world!" << endl;
    return 0;
}

结果连编译都过不了:

-------------- Build: Debug in btest (compiler: GNU GCC Compiler)---------------

mingw32-g++.exe -Wall -fexceptions -g  -c D:\btest\main.cpp -o obj\Debug\main.o
D:\btest\main.cpp:1:20: fatal error: iostream: No such file or directory
 #include <iostream>
                    ^
compilation terminated.

path中已加入MinGW路径:

%MinGW%\bin;%MinGW%\mingw32\bin;

另外codeblock中编译环境设置如图:

请问环境搭建存在什么问题?应如何排查?


试试eclipse-cdt

【热门文章】
【热门文章】