我最近安装了 MinGW,并且一直试图让它与 Sublime Text 3 一起使用,以便在编译脚本时打开 cmd,但是没有任何效果。
当我去工具 > 构建系统 > 新构建系统并保存此脚本,我不断收到错误:
'“C:......”不被识别为内部或外部命令
可运行的程序或批处理文件。
由于某种原因,可执行文件永远不会被创建。你如何让它发挥作用?我的 gcc 位于 C:\MinGW\bin
{
"cmd": ["gcc", "${file}", "-o", "${file_base_name}.exe"],
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"working_dir": "${file_path}",
"selector": "source.c, source.c++",
"shell": true,
"variants":
[
{
"name": "Run",
"cmd": ["start", "cmd", "/k", "${file_path}/${file_base_name}.exe"],
"shell": true
}
]
}