1.0 KiB
1.0 KiB
tags | ||
---|---|---|
|
vscode中同时编译多个源文件,task.json
配置如下:
{
"tasks": [
{
"type": "cppbuild",
"label": "C/C++: gcc.exe build active file",
"command": "D:\\mingw64\\bin\\gcc.exe",
"args": [
"-fdiagnostics-color=always",
"-g", "${workspaceFolder}\\*.c",
"-I", "${workspaceFolder}",
"-o", "${workspaceFolder}\\${fileBasenameNoExtension}.exe"
],
"options": {
"cwd": "${fileDirname}"
},
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
},
"detail": "Task generated by Debugger."
}
],
"version": "2.0.0"
}
`