"name": "Build & Run",
"shell_cmd": " deepin-terminal -e bash -c \"g++ '${file}' -o '${file_path}/${file_base_name}' ; '${file_path}/${file_base_name}' ; read -p '\nPress ENTER or type command to continue...'\""
},
{
"name": "Build Only",
"shell_cmd": "g++ '${file}' -o '${file_path}/${file_base_name}'"
},
{
"name": "Run Only",
"shell_cmd": " deepin-terminal -e bash -c \"'${file_path}/${file_base_name}' ; read -p '\nPress ENTER or type command to continue...'\""
}
]
}
但是运行的时候总是显示下面的错误:
(deepin-terminal:12845): Gtk-ERROR **: 18:41:06.214: GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported
[Finished in 0.0s with exit code -5]
[shell_cmd: deepin-terminal -e bash -c "g++ '/home/curve/Desktop/acm/2.cpp' -o '/home/curve/Desktop/acm/2' ; '/home/curve/Desktop/acm/2' ; read -p '
Press ENTER or type command to continue...'"]
[dir: /home/curve/Desktop/acm]
[path: /usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/sbin:/usr/sbin]
百度搜了 一遍配置c++编译环境的代码如下:
{
"shell_cmd": "g++ '${file}' -o '${file_path}/${file_base_name}'",
"file_regex": "^(..[^:]*)
"working_dir": "${file_path}",
"selector": "source.c, source.c++",
"variants":
[
{
"name": "Build & Run",
"shell_cmd": " deepin-terminal -e bash -c \"g++ '${file}' -o '${file_path}/${file_base_name}' ; '${file_path}/${file_base_name}' ; read -p '\nPress ENTER or type command to continue...'\""
},
{
"name": "Build Only",
"shell_cmd": "g++ '${file}' -o '${file_path}/${file_base_name}'"
},
{
"name": "Run Only",
"shell_cmd": " deepin-terminal -e bash -c \"'${file_path}/${file_base_name}' ; read -p '\nPress ENTER or type command to continue...'\""
}
]
}
但是运行的时候总是显示下面的错误:
(deepin-terminal:12845): Gtk-ERROR **: 18:41:06.214: GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported
[Finished in 0.0s with exit code -5]
[shell_cmd: deepin-terminal -e bash -c "g++ '/home/curve/Desktop/acm/2.cpp' -o '/home/curve/Desktop/acm/2' ; '/home/curve/Desktop/acm/2' ; read -p '
Press ENTER or type command to continue...'"]
[dir: /home/curve/Desktop/acm]
[path: /usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/sbin:/usr/sbin]
换成别的终端的命令系统又会出错,求帮忙...