I'm following this tutorial by vscode to install a C++ compiler on Windows. Right now, I'm trying to edit C:\msys64\mingw64\bin to environment variables and save MinGW to path. I clicked OK multiple times but seems like it can't save. I also entered g++ --version and gdb --version to check for installation. It just shows "'g++' is not recognized as an internal or external command, operable program or batch file."
If reinstalling MinGW
doesn't work, add MinGW
to PATH
manually by this:
computer's property
, and then go to Advanced
.Alt+N
PATH
in the box below.MinGW compiler
to it.
Note: Add the BIN folder
.If adding the BIN folder
doesn't work, add the BIN folder
in the folder under C:\msys64\mingw64
that has a long name like this:
x86_64-w64-mingw32
or whatever your folder is named.
IMPORTANT NOTE: REMEMBER TO RESTART YOUR COMPUTER AFTER DOING THIS.