如图 之前的设置也是根据大佬的教程安装配置的 然后复制了个程序试试 出现如下问题
没有找到对应的文件夹或目录 环境没配好。
把gcc.exe所在的文件夹添加到PATH里,task.json里也不用那么复杂,如下配置
{
"label": "g++dbbuild",
"type": "shell",
"presentation": {
"echo": true,
"reveal": "always",
"focus": false,
"panel": "shared"
},
"command": "g++.exe",
"args": [
"${file}",
"-g"
],
"options": {
"cwd": "${fileDirname}"
},
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
}
}