学习环境搭建之sourceinsight集成编译器

windows下安装gcc编译环境minGW,安装codeblocks默认安装此编译器。windows

windows设置,用户变量设置include,lib;系统变量PATH添加minGW的bin路径。ui

sourceinsight设置,添加快捷方式View->Toolbars->Toggle build toolbar;设置build project,clean build,compile files,run project。code

  设置方式,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编译程序了。如:io

all:编译

  gcc -o helloworld.exe helloworld.c变量

clean:gcc

  del *.exefile

program:gc

  helloworld.exe

相关文章
相关标签/搜索