拿到sublime,
将下载好的mingw“免安装版”拷贝到sublime根目录下
进入sublime-tools-build system-new build system,设置编译系统的配置文件,并保存文件名C++.sublime-build
[python] view plain copy
{
"path": "G:/Sublime Text 3_x64(Python and CPP)/MinGW/bin",
"cmd": ["g++.exe", "${file}", "-o", "${file_path}/${file_base_name}"],
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"working_dir": "${file_path}",
"selector": "source.c, source.c++",
"encoding":"UTF-8",
"encoding": "cp936",
"variants":
[
{
"name": "Run",
"cmd": [ "${file_path}/${file_base_name}.exe"],
"shell": true,
"cmd" : ["start", "cmd", "/k", "${file_path}/${file_base_name} &&echo. & pause && exit"]
}
]
}