The preLaunchTask 'C/C++: g++.exe build ative file'terminated with exit code -1. #14400
riveraagostoruben-commits
started this conversation in
General
Replies: 1 comment 13 replies
-
|
Sometimes the build fails because the compiler path has not been added to the %PATH% environment variable. If that's the case, you can try setting 'cwd' in your task to |
Beta Was this translation helpful? Give feedback.
13 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment




Uh oh!
There was an error while loading. Please reload this page.
-
I keep running into this problem I made sure I have the right path. I have switched from Windows power shell to command prompt and still not working, reinstalled msys2,
Starting build...
cmd /c chcp 65001>nul && C:\msys64\ucrt64\bin\g++.exe -fdiagnostics-color=always -g C:\test\test3\main.cpp -o C:\test\test3\main.exe
Build finished with error(s).
json-
{
"tasks": [
{
"type": "cppbuild",
"label": "C/C++: g++.exe build active file",
"command": "C:\msys64\ucrt64\bin\g++.exe",
"args": [
"-fdiagnostics-color=always",
"-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"
}
Beta Was this translation helpful? Give feedback.
All reactions