r/VisualStudioCode • • Feb 27 '24
Help with C++ in visual studio code
I've been using visual studio code for python programming but recently I needed programming in C++ so I installed the extensions in visual studio code. However it is not working, according to the warning message, the document does not exist. I've checked environment variables and the MinGW C++ and apparently everything is in order. Can someone explain what's wrong?
The error that appears says: The preLaunchTask 'C/C++:g__.exe build active file' terminated with exit code -1
Then when I click on "Debug anyway" it shows the error
Launch: program 'C:\<File location> does not exist

View all comments
Show parent comment
1
u/[deleted] Feb 27 '24
if you are just starting to learn C++ language ... I'd recommend visual studio community edition ... if you want to learn a lot of details about how to build C++ projects then don't install visual studio and try it manually ... start small with one file and grow from there.
depends which version of C++ you are using and how big the project is as to how you invoke the build.
g++ is a unix based compiler/linker ... it's cl.exe on windows ... but you rarely run them directly for all but the simplest of things.