sublime_text: 菜单栏: tool –> Build System –> New Build System
----------------------------------------------------------------------------------------------------------
{
"shell_cmd": "gcc \"${file}\" -o \"${file_path}/${file_base_name}\" -lpthread -Wformat=2",
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"working_dir": "${file_path}",
"selector": "source.c",
"variants":
[
{
"name": "Run",
"shell_cmd": "gcc \"${file}\" -o \"${file_path}/${file_base_name}\" -lpthread -Wformat=2 && \"${file_path}/${file_base_name}\""
}
]
}
-------------------------------------------------------------------------------------------------------------
保存到文件夹: /root/.config/sublime-text/Packages/User/
保存文件名: c_lpthread.sublime-build
6. 编写c程序, 。。。。
选择编译环境: tool –> Build System –>c_lpthread.sublime-build
运行:ctrl+B;