Sublime Text 2 for C/C++ and Python in Windows


Step 1. 安装 Python开发环境, DEV-CPP, Sublime Text 2

Step 2. 修改环境变量中的 Path
增加类似如下路径: D:\Program Files\Python33\;D:\Dev-Cpp\bin 
Sublime Text 2 for C/C++ and Python in Windows_第1张图片


Step3. 修改Sublime Text 2中的Tools->Build System->New Build System...
Sublime Text 2 for C/C++ and Python in Windows_第2张图片

Step 4.  新建gcc.sublime-build文件,保存下面内容并重启
  gcc.sublime-build
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{
     "cmd": [ "g++""${file}""-o""${file_path}/${file_base_name}"],
     "file_regex""^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
     "working_dir""${file_path}",
     "selector""source.c, source.c++",
 
     "variants":
    [
        {
             "name""Run",
             "shell"true,
             "cmd": [ "g++""${file}""-o""${file_path}/${file_base_name}""&", "${file_path}/${file_base_name}"]
        }
    ]
}

Step 5. 选择Step 3中的Automatic,Good Luck~

好吧,最后给一个注册码:
----- BEGIN LICENSE -----

Andrew Weber

Single User License

EA7E-855605

813A03DD 5E4AD9E6 6C0EEB94 BC99798F

942194A6 02396E98 E62C9979 4BB979FE

91424C9D A45400BF F6747D88 2FB88078

90F5CC94 1CDC92DC 8457107A F151657B

1D22E383 A997F016 42397640 33F41CFC

E1D0AE85 A0BBD039 0E9C8D55 E1B89D5D

5CDB7036 E56DE1C0 EFCC0840 650CD3A6

B98FC99C 8FAC73EE D2B95564 DF450523

------ END LICENSE ------



你可能感兴趣的:(语言学习篇:C/C++)