I am facing this issue : “the prelaunch task “c/c++.g++.exe build active file” terminated with exit code -1” error. I have added the path correctly for the ‘bin’ folder of ‘mingw’, but the issue continues.
path set for bin folder
The code would run easily on VSCODE without any pop-out dialogue, but suddenly after re-installing the mingw compiler, I am facing this issue.
the error
it is asking to choose an option when I am trying to run the code.
Additionally, this ‘.vscode’ has automatically showed up in my directory.
Few months back, everything was working properly. One day, I downloaded Git, and Flutter, and then I uninstalled them. Then suddenly my cpp files were not running, it was showing the same error. Thus, I rebooted my system.
I tried to download ‘mingw64’ compiler, using MSYS, but it threw some installation errors.
Then, now I installed it using “SOURCEFORGE.NET”, it was installed correctly (Downloaded every package except the MSYS packages, like I installed, ada and fortran and g++ and mingw base).
I set the path as shown.
path set
Then I tried to compile my previous cpp source codes, then it was throwing error that “.exe file does not exist”. Then I tried to compile it on the terminal (of VsCode) using “g++ file_name.cpp”, then it started throwing the error : “the prelaunch task “c/c++.g++.exe build active file” terminated with exit code -1″
Sameep is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
2