"g ++" is not recognized as an internal or external command, MinGW

I have Windows 7 x86 on my computer. I installed MinGW, I wrote the path, but when I go to 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 that it should be installed).

+8
c ++ eclipse g ++ mingw
source share
3 answers

Seeing the make command working fine, I think you forgot to check the mingw-gcc-g++ package in the MinGW Installation Manager.

Run the MinGW installation manager again and check mingw-gcc-g++ to install and click Apply Changes

+7
source share

You need to change the environment variables. Follow these steps:

  • On the desktop, right-click "Computer" and select "Properties."
  • In the "Computer Properties" window, click "Change Settings"
  • In the "System Properties" window that opens, go to the "Advanced" tab.
  • In the Advanced section, click the Environment Variables button.
  • Finally, in the "Environment Variables" window (as shown below), highlight the "Path" variable in the "System Variables" section and click the "Edit" button. Add or modify path lines using the paths you want to access. Each individual directory is separated by a semicolon, as shown below.

    C:\Program Files;C:\Winnt;C:\Winnt\System32

You can also refer to this link.

+6
source share

I had the same problem in Sublime ..

 Right click on my computer Advanced system settings Environment variables in system variables, change path to location of '...\MinGW\bin' 

Example: D: \ work \ sublime \ MinGW \ bin

+1
source share

All Articles