问题描述
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:btestmain.cpp -o objDebugmain.oD:btestmain.cpp:1:20: fatal error: iostream: No such file or directory #include <iostream> ^compilation terminated.
path中已加入MinGW路径:
%MinGW%bin;%MinGW%mingw32bin;
另外codeblock中编译环境设置如图:
请问环境搭建存在什么问题?应如何排查?
问题解答
回答1:试试eclipse-cdt