Sublime Text 2 C++コンパイル環境を設定します。


一、GCCコンパイラをインストールして、私がインストールしたのはtdm 64-gcc-5.1.0-2です。ダウンロードリンク:http://tdm-gcc.tdragon.net/download
二、SublimeのBuiildプロファイルを設定します。1,Sublime Textを開けてTools->Build System->New Build Systemをクリックしてください。
2,以下を入力します。
{

"cmd": ["g++", "-Wall","-fexceptions", "-g", "-std=c++11","${file}", "-o", "${file_path}/${file_base_name}"],
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"working_dir": "${file_path}",
"selector": "source.c, source.c++",
"encoding":"cp936",  

"variants":
[ { "name": "Run", "cmd": ["cmd", "/c", "g++", "-Wall","-fexceptions", "-g", "-std=c++11", "${file}", "-o", "${file_path}/${file_base_name}", "&&", "cmd", "/c", "${file_path}/${file_base_name}" ] }, { "name": "RunInCommand", "cmd": ["cmd", "/c", "g++","-Wall","-fexceptions", "-g", "-std=c++11","${file}", "-o", "${file_path}/${file_base_name}", "&&", "start", "cmd", "/c", "${file_path}/${file_base_name} & echo.&pause" ] } ] }
NewC+++として保存します。sublime-buildこのファイルの位置:Sublime Text 2.02 x 64\Data\Packages\User
3,Tools->Buiild System->NewC++はC+ソースファイルでCtrl+Bでコンパイルし、Ctrl+Shift+Bで実行します。
片付く。