Forum Discussion
Windows 11 environment variables related doubts
Hello there! My name is Thiago Chaves, I'm a software engineering student.
I wanted to make my VS Code to run C in its terminal, so a followed this website steps C++ programming with Visual Studio Code, mainly because it's a official tutorial from Visual Studio. I downloaded MSYS2 in my computer and followed all the steps until the "Check your MinGW Installation" section. I went to my terminal and checked that neither gcc, g++ or gdb were there.
The problem is: when I was configuring the Environment Variables, at the "User Variables", I erased the Path variable and paste the "C:\msys64\mingw64\bin" directory the website was telling me to. And now that I couldn't install MinGW rightly (I think), I thinking of uninstalling ans installing the MSYS2 again, but what will happen to the variable Path if I do this? If so, how can I solute this problem?
I'm no specialist in operacional systems config at all, so I need a lot of your help ;-;
- jimmaphyBrass Contributor
The entry might get removed, everything else will stay the same.
I'm assuming that everything up until installing MinGW went correctly.
When changing your 'path' variable, whether you put it in user or system doesn't matter.
Unless you're planning to share the computer / laptop with others.
Do make sure that you're changing your path, and not your gopath; those are different.
Either dubbelclick the row, or select it and press 'Edit', it's the second button.
When you're in the path menu, add a new one containing the path to your installation.
By default, this is C:\msys64\mingw64\bin unless you've changed the installation directory.
Mine is different because I like to be special.
You can always browse and check it out if you're uncertain.
Make sure to restart all shells (terminal, command prompt) and Visual Studio Code.
At this point everything should work. Try this or we'll try something else.