0
点赞
收藏
分享

微信扫一扫

sublime text 3编译C\C++

首先在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 <stdio.h>
#include <stdlib.h>
int main()
{
printf("Hello World\n");
system("pause");
return 0;
}

生成ssh key:
​​​http://git.mydoc.io/?t=154712​​


举报

相关推荐

0 条评论