学习环境搭建之sourceinsight集成编译器
windows下安装gcc编译环境minGW,安装codeblocks默认安装此编译器。
windows设置,用户变量设置include,lib;系统变量PATH添加minGW的bin路径。
sourceinsight设置,添加快捷方式View->Toolbars->Toggle build toolbar;设置build project,clean build,compile files,run project。
设置方式,options->custom commands,选择相应命令,Run填写mingw32-make.exe all/clean/program(自己定义的,但要和makfile文件中对应,这就是调用make命令),output选择1,2。control选择1。source links in output选择,file,then line选择(这些都是自己定义,根据含义选择即可);
在project目录下建立makefile就可在sourceinsight编译程序了。如:
all:
gcc -o helloworld.exe helloworld.c
clean:
del *.exe
program:
helloworld.exe
posted on 2013-06-24 22:10 kevin_kang 阅读(3244) 评论(0) 收藏 举报