Search code examples
c++makefilecmdmingwsdl

g++ not recognised as a command running a makefile on Windows


I have looked at this post on stackoverflow and they said to use the command prompt called "Developer Command Prompt for VS2012" and run this command:

nmake -f Makefile.win

This was the error I got.

enter image description here

It says g++ is not recognized but I have it installed. Does anyone know what is wrong?

enter image description here


Solution

    1. Go to environment variables window (using the research bar of Windows).
    2. Edit Path variable adding the full path of where g++ is installed (do not include g++.exe at the end).

    Save, run cmd and try again to use your makefile.