Program won't run in vscode while program correctly compiled and works on other IDEs #9749
Unanswered
mohamedrhoulam
asked this question in
Q&A
Replies: 1 comment 7 replies
-
Beta Was this translation helpful? Give feedback.
7 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.
Uh oh!
There was an error while loading. Please reload this page.
-
So I installed vscode and mingw using mysys2 (as being told in: https://code.visualstudio.com/docs/cpp/config-mingw). After checking if my compiler is installed using

g++ --version
andgdb --version
I get the expected output I am trying to run the same sample program when clicking on the play button I get this blue text with the outputmy task.json:
{ "tasks": [ { "type": "cppbuild", "label": "C/C++: g++.exe build active file", "command": "C:\\msys64\\mingw64\\bin\\g++.exe", "args": [ "-fdiagnostics-color=always", "-g", "${file}", "-o", "${fileDirname}\\${fileBasenameNoExtension}.exe" ], "options": { "cwd": "${fileDirname}" }, "problemMatcher": [ "$gcc" ], "group": { "kind": "build", "isDefault": true }, } ], "version": "2.0.0" }
I have been using CLion and never had an issue with this, also note that I had to reinstall my compiler to check if it would solve the problem. but it didn't work on vscode.
Beta Was this translation helpful? Give feedback.
All reactions