当前位置: 移动技术网 > IT编程>开发语言>C/C++ > subliem text 3编译C\C++

subliem text 3编译C\C++

2018年11月09日  | 移动技术网IT编程  | 我要评论

首先在tools下的build system里边点击new build system,编辑如下内容:

{
"cmd": ["$packages\\tcc\\tcc.bat", "$file", "$packages\\tcc\\tcc.exe"],
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"selector": "source.c"
}

在刚才tcc的文件夹下我们添加一个文件,tcc.bat,内容如下:

if exist %~n1.exe (del %~n1.exe)
%2 %1
start cmd /c %~n1.exe

不要小看这三行,很精髓的。
至此呢,我们就完成了tcc关于st的移动编译器的全部工作了。
新建一个文件a.c,内容如下:

#include 
#include 
int main()
{
printf("hello world\n");
system("pause");
return 0;
}

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网