Sublime text3 C++自建编译系统
{
"encoding": "utf-8",
"shell_cmd": "/opt/homebrew/Cellar/gcc/11.2.0_3/bin/g++-11 $file_path/$file_name -std=c++11 -o yuhyuhy",
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"selector": "source.c,source.c++,source.cpp",
"file_patterns":"*.cpp,*.c,*.c++",
"shell":true,
"variants" :
[{
"name" : "Date",
"shell_cmd" : "open /Users/yuhengyu/ttest.txt"
},
{
"name" : "Run",
"shell_cmd" : "./yuhyuhy"
},
{
"name" : "Date-Run",
"shell_cmd" : "./yuhyuhy < /Users/yuhengyu/ttest.txt"
}]
}
执行时用shift+command+B选择执行类型
我太难了,留个记录防老qwq。。。