官网地址:http://www.sublimetext.com/3 ubuntu直接在Ubuntu Software中搜索sublime安装
下载Mingw放到C盘,path路径设为`C:\MinGW\bin` 在cmd中输入`g++ -v`或`gcc -v`判断路径是否设置成功,path路径在电脑重启后生效
在控制台中加入一下网址的代码 https://packagecontrol.io/installation
在windows下的编译配置文件(支持c++11)html
{ "encoding": "cp936", "working_dir": "$file_path", "shell_cmd": "g++ -Wall -std=c++11 -fexec-charset=GBK $file_name -o $file_base_name", "file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$", "selector": "source.c++", "variants": [ { "name": "Run", "shell_cmd": "g++ -Wall -fexec-charset=utf-8 \"$file\" -o \"$file_base_name\" && start cmd /c \"\"${file_path}/${file_base_name}\" & pause\"" } ] }
用c编译的话只需用
gcc
替换上述代码的g++
便可`c++
在ubuntu下的编译配置文件(支持c++11)shell
{ "shell_cmd": "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++", "variants": [ { "name": "Build & Run", "shell_cmd": "x-terminal-emulator -e bash -c \"g++ '-std=c++11' '${file}' -o '${file_path}/${file_base_name}' ; '${file_path}/${file_base_name}' ; read -p '\nPress ENTER or type command to continue...'\"" }, { "name": "Build Only", "shell_cmd": "g++ '-std=c++11' '${file}' -o '${file_path}/${file_base_name}'" }, { "name": "Run Only", "shell_cmd": "x-terminal-emulator -e bash -c \"'${file_path}/${file_base_name}' ; read -p '\nPress ENTER or type command to continue...'\"" } ] }
https://www.cnblogs.com/kearon/p/7354888.html