Код: Выделить всё
* Executing task: C/C++: g++.exe build active file
Starting build...
C:\msys64\mingw64\bin\g++.exe -fdiagnostics-color=always -g3 -Wall H:\VSCode\CPP\helloworld.cpp -o H:\VSCode\CPP\helloworld.exe
The system cannot find the path specified.
Build finished with error(s).
* The terminal process failed to launch (exit code: -1).
* Terminal will be reused by tasks, press any key to close it.
Код: Выделить всё
{
"version": "2.0.0",
"tasks": [
{
"type": "cppbuild",
"label": "C/C++: g++.exe build active file",
"command": "C:\\msys64\\mingw64\\bin\\g++.exe",
"args": [
"-fdiagnostics-color=always",
"-g3",
"-Wall",
"${file}",
"-o",
"${fileDirname}\\${fileBasenameNoExtension}.exe"
],
"options": {
// "${fileDirname}" also gives the same problem.
"cwd": "C:\\msys64\\mingw64\\bin"
},
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
},
"detail": "compiler: C:\\msys64\\mingw64\\bin\\g++.exe"
},
{
"type": "shell",
"label": "Run C/C++: g++.exe",
"command": "C:\\msys64\\mingw64\\bin\\g++.exe -g3 -Wall \"${file}\" -o \"${fileDirname}\\${fileBasenameNoExtension}.exe\"",
"options": {
"cwd": "C:\\msys64\\mingw64\\bin"
},
"problemMatcher": [
"$gcc"
],
"detail": "compiler: C:\\msys64\\mingw64\\bin\\g++.exe"
}
]
}
helloworld.cpp
Код: Выделить всё
#include
using namespace std;
int main(){
cout
Подробнее здесь: [url]https://stackoverflow.com/questions/73174878/visual-studio-code-c-build-finished-with-errors[/url]