linux mint sublime3的c编译环境配置

通过Tools>>Build System>>New Build System弹出新建文件来设置,也可以replace覆盖以前的

一种方式,konsole可以通过sudo apt-get install konsole来安装

C.sublime-build(.sublime-build后缀是固定的):

{

    "shell_cmd": "gcc "${file}" -o "${file_path}/${file_base_name}" -lm -Wall",

    "file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",

    "working_dir": "${file_path}",

    "selector": "source.c",

    "variants":

    [
        {

            "name": "Run",

            "shell_cmd": "konsole -e bash -c ""${file_path}/${file_base_name}" ; read -p 'Press any key to continue...'""

        }
    ]
}
 
 
另一种方式:要查看结果只能在命令窗口中使用./加文件头名
C.sublime-build
{
"cmd" : ["gcc", "$file_name", "-o", "${file_base_name}"],
"selector" : "source.c",
"shell":false,
"working_dir" : "$file_path"
}
原文地址:https://www.cnblogs.com/liunnis/p/4689002.html