On my computer I have Windows 7 x86. I installed MinGW, I wrote the path but when I go in cmd.exe and write g++ -v it says:
"g++" is not recognized as an internal or external command.
But when I write the make -v command it recognizes it. I need this for school, I work in Eclipse, I even installed the latest java(I saw it must be installed).
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.
If you don't see the expected output or g++ or gdb is not a recognized command, make sure your PATH entry matches the Mingw-w64 binary location where the compilers are located. If the compilers do not exist at that PATH entry, make sure you followed the instructions on the MSYS2 website to install Mingw-w64.
Mingw executables They also provide other compiler drivers, which in the case of mingw are executables such as g++, c++, g77, etc. These drivers invoke the appropriate compiler programs to compile your source code. Note that g++ and c++ are identical files except for the name difference.
Seeing that the make command works fine, I think you forgot to mark the mingw-gcc-g++
package in the MinGW Installation Manager.
Run the MinGW Installation Manager again and mark mingw-gcc-g++
for installation and press Apply Changes
You have to modify environment variables. Do the following:
Finally, in the Environment Variables window (as shown below), highlight the Path variable in the Systems Variable section and click the Edit button. Add or modify the path lines with the paths you wish the computer to access. Each different directory is separated with a semicolon as shown below.
C:\Program Files;C:\Winnt;C:\Winnt\System32
Additionally you may refer to this link
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