0%

SublimeText G++编译系统(调用系统终端)

新建编译系统,输入以下内容

1
2
3
4
5
6
7
8
9
10
11
12
13
14
{ 
"cmd" : ["g++", "$file_name", "-o", "${file_base_name}", "-lm", "-Wall"],
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"selector" : "source.c, source.c++",
"shell":false,
"working_dir" : "$file_path",
"variants":
[
{
"name": "RunInCommand",
"cmd": ["cmd", "/c", "g++","-g", "${file}", "-o", "${file_path}/${file_base_name}", "&&","start", "cmd", "/k", "${file_path}/${file_base_name}"]
}
]
}