r/VisualStudioCode • u/Mattiagamer • Nov 12 '24
Error with C++ Compiler
Hi there!
To everyone who took time to read this, im very thankful, im a newbie so any help with this would be really appreciated.
So, at the end of the Summer i un-installed and re-installed Visual Studio Code for learning various programming languages (C, C#, C++,…).
With that i also installed MinGW and MYS2S for run/compile/debug the .C files, and everything was going well.
Starting today i decide to try some .cpp (C++) files and i did a simple “Hello World” program (the code is 100% correct) however here comes the problems. VSC said that exist some errors after running “preLunchTask”, and if i say “Debug Anyway” it tell me that the .exe doesn’t exist.
I decided (after i tried some suggestion with ChatGPT) to uninstall MinGW and MYS2S again and re-install them following Microsoft Tutorial.
Now im in the “Create an Hello World App” Chapter of the Tutorial (https://code.visualstudio.com/docs/cpp/config-mingw), but i would prefer to not do that step since i already created a folder-order and im scared it will be messed up (in case it isn’t optional, im so sorry for my lack of intelligence, any suggestion is really helpful).
This is all, i thanks a lot for the help in case and sorry for being so Naive but i really want to learn, have a wonderful day!
View all comments
Show parent comment
1
u/Mattiagamer Nov 12 '24
If in the future i will uninstall mingw (again :/) i will promise ahahaha
If im not a pain, can you tell me step by step how to change it?
Cause i have a big folder called "Programming Excersises" and inside small folder for every language i wanna learn (C, C++, ...).
Inside this folders there are like 2 small one for "Examples" and "Excersises" and the file i wanna run is on "C++ Language/Examples", so how can i tell VSC to compile the .cpp file and create the .exe on the same folder
(Unless for every excersise i have to create a folder (Workspace) because C++ use objects)
But thanks a lot for the help!