[Solved] the preLaunchTask 'C/C++:gcc.exe build active file' terminated with exit code -1 (VS Code)

preview_player
Показать описание

Рекомендации по теме
Комментарии
Автор

Is this issue rare? Why no one is making videos on how to solve this issue? I think we have to ask Visual studio code team directly to state how to fix this in there website

real.l_ryozaki
Автор

if anyone is still having this issue
1. From the "Edit Configurations (UI)" access the "c_cpp_properties.json" file and change the "compilerPath" to g++.exe instead of gcc.exe.
2. In the folder of your cpp file you'll find a ".vscode" folder. Open the file "tasks.json" inside it.
3. Change the "command" path to g++.exe instead of gcc.exe

seungxx
Автор

I had this problem and for me the cause was vscode tried compiling c++ file with gcc. gcc doesn't have access to standard c++ lib needed for std::cout, so my std::cout << "Hello World"; was causing the program to crash. The fix was changing the compilerPath in c_cpp_properties.json to end with g++.exe instead of gcc.exe and doing the same swap in tasks.json in line "command".

PePe-iswj
Автор

Hi, just run vs code in adminstrator mode (first time). Second time there will be no issues. This under the impression that you did install gcc/g++ in the environment variables correctly.

stephenunknown
Автор

there is no c/c++: edit configurations (ui)“ in command palette, i have followed all previous tasks as you said

mazharulalam
Автор

I am not able run large programs problem was resolved for small help

Jita-bdft
Автор

(prelaunchtask c/c++ g++.exe build active file terminated with exit code), run and dubbug krne pe ye aa rha h .

SatyamSingh-gqsp
Автор

still doesnt work, its already like 6 months that its not working i dont know what to do

ivanodivano
Автор

issue is still not solved, though i checked everything you mentioned.

phuleraniwasi
Автор

My Problem got solved but next day again appeared

bhagatalisha
visit shbcf.ru