Eclipse相当强大也相当好用,就是配置挺繁琐,而且问题不断,花了几天时间捣鼓终于把Windows下的C开发环境给弄好了!
1、下载Eclipse:http://www.eclipse.org/downloads/;
2、下载MinGW(我安装的是:http://www.sourceforge.net/projects/mingw(mingw-get-ints)选择MinGW Complier Suite中的C complier、MinGW Developer ToolKit,安装路径选择c盘根目录;
3.将C:/MinGW/bin中的mingw32-make.exe改名为make.exe;
4.设置环境变量:右键单击我的电脑--->属性---》高级--->环境变量--->系统变量--->找到其中的Path变量,双击,在变量值后添加C:/MinGW/bin(在select will install MinGW into the following folder中路径选择C:/MinGW;
5.打开Eclipse,File--->new--->C project--->Executable--->Empty Project(or other),建立一个空的工程,添加c source file,编一个简单的Hello World;
6. 在小甲虫中设置Debug Configurations中的Debugger选项:Debugger:MinGW gdb Debugger,GDB debugger:C:/MinGW/bin/gdb.exe,GDB command set:Standard(Windows)
常遇问题解决方法:
1.An internal error occurred during: "Launching New_configuration". Path for project must have only one segment.的解决方法:
Project -> Properties -> Run/Debug Settings:
1. select "Launching New_configuration"
2. Delete
3. OK
安装过程有个小小的收获:遇到问题,多看看官方网站上的文档,不要太依赖其他人的解决方法!