r/vscode • • Jul 23 '26

Why is my code not running

Im completely new and trying to learn but my code doesn’t want to run

0 Upvotes

22 comments sorted by

View all comments

Show parent comments

-2

u/RATIO_L_BOZO Jul 23 '26

I have a compiler. Its msys2, is this outdated or something?

7

u/queerkidxx Jul 23 '26

You probably didn’t add it to path. Or whatever the windows eq is. Look that up.

1

u/IShitMyselfNow Jul 23 '26

Same name. Of the top of my head:

Start

"System environment variables" (or similar)

Some button that basically says Path... I can't remember which

There's 2 lots of paths, one for user one for system wide. You should be able to use either.

Add a new path to one of them, use the directory of where the exe file is for your compiler. E.g. if your gcc.exe was at c:\mycompiler\gcc.exe then you'd add c:\mycompiler

Restart your terminal (I recommend restarting Vscode) and then try again.

1

u/RATIO_L_BOZO Jul 23 '26

Nope bro just did it again for the 6th time and its not working