{
"cmd": ["gcc", "${file}", "-o","${file_path}/${file_base_name}"],
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:?(.*)$",
"working_dir": "${file_path}",
"encoding":"cp936",
"selector": "source.c",
"variants":
[
{
"name": "Run",
"cmd": ["cmd","/C","start","cmd","/c", "${file_path}/${file_base_name}.exe &pause"]
}
]
}
环境变量添加gcc路径
linux
{
"shell_cmd": "gcc \"${file}\" -o \"${file_path}/${file_base_name}\" -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}\" -Wformat=2 && \"${file_path}/${file_base_name}\""
}
]
}