用Sublime Text 3编译C源文件

来源:互联网 发布:淘宝的司法拍卖靠谱 编辑:程序博客网 时间:2024/05/16 10:39

Tools->New Build System

{"shell_cmd": "gcc \"${file}\" -o \"${file_path}/${file_base_name}\" -std=c11 -O2 -Wall -lm --static","file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$","working_dir": "${file_path}","selector": "source.c, source.c++","variants":[{"name": "Run","shell_cmd": "gcc -std=c11 -O2 -Wall -lm --static \"${file}\" -o \"${file_path}/${file_base_name}\" && \"${file_path}/${file_base_name}\""}]}

保存为GCC.sublime-build即可。

原创粉丝点击