通过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"
}

相关文章:

  • 2022-12-23
  • 2021-06-04
  • 2022-12-23
  • 2020-06-09
  • 2022-01-14
  • 2021-04-08
  • 2021-05-10
猜你喜欢
  • 2021-09-24
  • 2021-08-14
  • 2022-12-23
  • 2021-11-11
  • 2022-12-23
  • 2022-12-23
  • 2017-12-07
相关资源
相似解决方案