步骤:
1、安装JDK并配置环境变量
2、安装Eclipse
3、在Eclipse中安装插件CDT
4、安装MinGW并配置环境变量
5、在Eclipse中配置MinGW
具体步骤:
1、去官方网站http://www.oracle.com/technetwork/java/javase/downloads/index.html下载,配置的步骤参考:http://java.chinaitlab.com/JDK/398544.html。
2、去官方网站http://www.eclipse.org/downloads/下载Eclipse IDE for C/C++ Developers (includes Incubating components)。
3、打开Eclipse,在help->Install New Software中,在Work With地址栏中输入http://download.eclipse.org/tools/cdt/releases/indigo,进行CDT的安装。
4、去官方网站http://sourceforge.net/projects/mingw/files/Automated%20MinGW%20Installer/mingw-get-inst/,安装时需要连网。
5、打开Eclipse,在Window->Preferences->C/C++->New CDT Project Wizard->Makefile Project,选择Elf Parser 或者PE Windows Parser。
接下来就可以创建C/C++工程进行测试了。
在第五步中应该选择Elf Parser 还是PE Windows Parser呢?我是首先选择PE Windows Parser,没想到报错,后面选择Elf Parser 时就能够正常编译运行。
我的系统是XP SP3的,你们自己去试试。