Sublime text 3 Build System in C++ 从终端获取输入

Sublime text 3 Build System in C++ which takes input from Terminal

我正在寻找一个 sublime text 3 构建系统,它可以 运行 我在 C++14 中的程序,使用终端从用户那里获取输入并在终端中显示我的输出。在网上搜索后,我在网上找到了这样一个构建系统。构建系统如下:

{
/* Custom Build file for C++14, supports input from user.
* Default terminal emulator is gnome-terminal. You can change it to xterm or
* terminator by changing "gnome-terminal -x" in "cmd" in "variants" field to
* "xterm -e" or "terminator -x".
*/
"cmd": ["g++", "-std=c++14", "$file", "-o", "${file_path}/${file_base_name}"],
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"working_dir": "${file_path}",
"selector": "source.c, source.c++, source.cxx, source.cpp",
"variants":
[
{
"name": "Run",
"cmd": ["bash", "-c", "g++ -std=c++14 '${file}' -o '${file_path}/${file_base_name}' && gnome-terminal -x bash -c '\"${file_path}/${file_base_name}\" ; read'"]
}
]
}

它 运行 完美地完善了我的代码,并且完成了我正在查看的所有内容。但是我在 sublime 控制台上收到一条消息,上面写着:

# Option "-x" is deprecated and might be removed in a later version of gnome-terminal.
# Use "-- " to terminate the options and put the command line to execute after it.
[Finished in 1.3s]

这是什么意思?我怎样才能通过编辑我上面的 sublime build 来解决这个问题?

警告消息完全不言自明。在“运行”部分,命令是

"cmd": ["bash", "-c", "g++ -std=c++14 '${file}' -o '${file_path}/${file_base_name}' && gnome-terminal -x bash -c '\"${file_path}/${file_base_name}\" ; read'"]

&& 之后,不用 gnome-terminal -x bash -c ...,只要输入 gnome-terminal -- bash -c ... 就可以了。