ref to
Visual Studio Code 配置C/C++编译环境流程及问题解决(Win10环境)_一只特立独行的程序猿的博客-CSDN博客_g++ -v -e -x c++ -
MingW
mingw-w64-install.exe
Vscode
插件
ctr+shift+p
tasks.json
{
"tasks": [
{
"type": "cppbuild",
"label": "C/C++: g++.exe build active file",
"command": "D:\\Program Files\\mingw64\\bin\\g++.exe",
"args": [
"-fdiagnostics-color=always",
"-fexec-charset=GBK",
"-std=c++17",
"-g",
"${file}",
"-o",
"${fileDirname}\\${fileBasenameNoExtension}.exe"
],
"options": {
"cwd": "${fileDirname}"
},
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
},
"detail": "Task generated by Debugger."
}
],
"version": "2.0.0"
}