[Mac] C configuration sublime Development

1, sublime text3, Tools / Build System / New Build system to create a new profile.

{
"cmd": ["gcc", "${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",
"cmd" : ["${file_path}/${file_base_name}"]
}
]
}

 

2, these period of copy and paste, save as C.sublime-build.

Then create a new .c file, such as helloworld.c, cmd + b compilation, shift + cmd + b run, you can.

 

PS: C terminal are written directly

1. Create a file hello.c;

2, gcc hello.c compiled;

3. After compilation, generate a.out file, executable file,. / A.out to run.

Guess you like

Origin www.cnblogs.com/jiangyi-uestc/p/11222030.html