下载C++环境:sudo apt-get install build-essential
配置代码:
{
"cmd":["g++","${file}","-o","${file_path}/${file_base_name}"],
"file_regex":"^(..[^:]*):([0-9]+):?([0-9]+)?:?(.*)$",
"working_dir":"${file_path}",
"selector":"source.c,source.c++",
"variants":
[
{
"name":"Run",
"cmd":["gnome-terminal","-x","bash","-c","g++ '${file}' -o '${file_path}/${file_base_name}' && '${file_path}/${file_base_name}' ; read -n1 -p 'press any key to continue.'"]
}
]
}