System: Windows 8.1 64bit
Software: Sublime Text 3 Build3065 x86
Compiling software: MinGW
1. Download Sublime Text 3
2. I'm using the flow of a voiceless change + -bit version, - The position seems to be unstable.
3. : http://haojian138.blog.163.com/blog/static/212643110201393010438357/
4. Download: MinGW . Address:http://sourceforge.net/projects/orwelldevcpp/files/Compilers/MinGW/MinGW%204.8.1.7z/download
5. Personal Network disk: Http://pan.baidu.com/s/1qWlvAgs
Http://pan.baidu.com/s/1eQIPZaE
6.   unzip MinGW
7. --> advanced --> environment variable.
1) in system environment variables path c:\mingw\bin (if there are any other variables, remember to add the English semicolon ; )
2) new library_path variable, add c:\ Mingw\lib
3) new c_includede_path variable, value set to C:\MinGW\include
  ps mingw installation path set
8. test mingw Whether the installation was successful. win+r cmd command line, in CMD window execution g++-v
-
9. Run as Administrator sublime text 3, Enter menu Tool - à compilation system - à New compilation system
enter the following and save the file as Cpp.sublime-build ( be careful not to modify the file name and capitalization ) .
{
"cmd": ["g++", "${file}", "-O", "${file_path}/${file_base_name}"],
"File_regex": "^ (... [^:]*]:([0-9]+):? ([0-9]+)?:? (.*)$",
"Working_dir": "${file_path}",
"Encoding": "cp936",
"Selector": "Source.c",
"Variants":
[
{
"Name": "Run",
"cmd": ["cmd", "/C", "Start", "cmd", "/C", "${file_path}/${file_base_name}.exe & Pause"]
}
]
}
. test. Before compiling in the tool -Compiling the system SelectCPP. himself inSublimetextWrite aC + +programs thatctrl+bfor compiling;ctrl+shift+bfor the post-compilationCMDrun in. For example, both Chinese and English are displayed normally.
Using Sublime Text 3 to debug/run A/C + + program under Windows