三、下载Eclipse+CDT(Eclipse:环境;CDT:C++插件) 当然可以分别下载并安装Eclipse和CDT(未经尝试),但是目前Eclipse+CDT已经可以集成下载了。 下载地址:http://download.actuatechina.com/eclipse/technology/epp/downloads/release/galileo/R/eclipse-cpp-galileo-win32.zip E.G.:eclipse-cpp-galileo-win32.zip(6,637KB)
=>>这个直接解压到某个目录就行了。
四. Qt Eclipse Integration(集成Qt和Eclipse) 下载地址: http://dist.trolltech.com/developer/download/qt-eclipse-integration-win32-1.5.2.exe E.G.:qt-eclipse-integration-win32-1.5.2.exe(6.48MB) =>>直接安装就可以了。 没什么好说的,就是选对Eclipse和MinGW的路径即可。 五. 然后配置环境变量: 在系统环境变量里加入下列设定:( 确认路径名正确与否!!!)PATH :C:\MinGW\bin; (如果系统已经有装其它C/C++编译器,请把C:\MinGW\bin加在最前面。) LIBRARY_PATH :C:\MinGW\lib C_INCLUDE_PATH :C:\MinGW\include CPLUS_INCLUDE_PATH :C:\MinGW\include\c++\3.4.2;C:\MinGW\include\c++\3.4.2\mingw32; C:\MinGW\include\c++\3.4.2\backward;C:\MinGW\include
另外,为了使CDT能够取用 MinGW来进行编译的工作, 我们要回到 Eclipse 当中进行设定 Window->Preferences->C/C++->New CDT project wizard->Makefile Project 找到 Binary Parser 取消 Elf Parser 改选 PE Windows Parser 。
六. 如果工程出错,以下是重要的解决办法
[WR1]
解决方法:编译qt库 运行cmd,进入Qt安装目录下bin目录,输入编译库命令: X:...\Qt\bin>qtvars.bat compile_debug X:...\Qt\bin>y 选择后一直编译,时间比较长,本机需45分钟左右。
[WR2]
the selection cannot be launched and there are no recent launches 解决方法:在Workspace中->右键->Run As ->选C++那一项;
[WR3]
此后总需在MinGW下打开Eclipse,即start Eclipse with MinGW,否则将报Error launching builder (mingw32-make debug)等错。
七. 基本上这样不会出错了。当然你可以按照其它类似的方法去做。以下提供类似链接:
http://twyok.blog.163.com/blog/static/8122930320106245559482/ 用迅雷快点
