I downloaded and installed MinGW. I used the graphical program to install the C++ compiler.
Typing gcc
in the Windows command line prints:
gcc is not recognized as an internal or external command
I checked, and gcc.exe
is present in C:\MinGW\bin
. What's wrong?
Looks like the answer is in here. Because you don't have the uri path to the MinGW\bin directory, your machine can't recognize gcc . You have to add it to the Path environment variable in your system. You can get to environment variables by just typing environment variables in the Windows search box in your taskbar.
You need to set the environment PATH to include the directory of mingw's bin directory if you want o use gcc.exe or g++.exe in cmd . run 'path' or 'echo %PATH% in cmd.exe prompt. Check the path carefully.
Although an old question, none of the answers here helped me. The only route I found to get to my destination is by typing in the following line in my command prompt:
To copy: set Path=C:\MinGW\bin;%PATH%
After that, simply type in gcc -v.
Hope this helps anyone with the problem I had!
Or at the command line you must type in "\mingw\bin\gcc" instead of just "gcc". Best to set the environment as mentioned above.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With