1

I'm reading Foundations of Qt Development - by Johan Thelin.

Here quote from page 450 about Building QMake Project.

If you choose to create a Makefile using QMake, you can build your project using a simple make command (or nmake if you’re using Visual Studio). You can clean up your intermediate files using make clean. The slightly more brutal step is to run make distclean, which cleans up all generated files, including the Makefile. You will have to run QMake again to get a Makefile for make.

I tried hard to clean the files using 'make clean'. But cmd displaying the message 'make' is not recognized as an internal or external command, operable program or batch file.

I searched here and tried to find the PATH to make inside Qt directory. But not successful. Then according to this solution I tried to use mingw32-make also. But same results.

Anyone of you can help me?

Community
  • 1
  • 1
Hareen Laks
  • 1,432
  • 2
  • 17
  • 33
  • What C++ compiler are you using? If it's Visual C++ (Visual Studio's compiler) the make command is: _nmake_, if you are using MinGW than the command is indeed: _mingw32-make_ but you need the _bin_ folder in mingw instalation directory added in your path in environment variables, so the os can find _mingw32-make.exe_. – Zlatomir Nov 25 '15 at 10:19
  • I'm using Qt 5.5.1. I searched the path of compiler and it is 'C:\Qt\Tools\mingw492_32\bin\g++.exe'. It is g++ compiler right? – Hareen Laks Nov 25 '15 at 10:25
  • 1
    MinGW is a windows port for gcc, just add the path C:\Qt\Tools\mingw492_32\bin\ in the Path variable in environment variables. – Zlatomir Nov 25 '15 at 11:40

1 Answers1

1

If you using mingw32, try mingw32-make clean. Remember, you must add mingw's bin directory to User Enviroment to use this command. Follow "My Computer" > "Properties" > "Advanced" > "Environment Variables" > "Path" and add ;C:\Qt\Tools\mingw492_32\bin

OR

use command: setx PATH %PATH%;C:\Qt\Tools\mingw492_32\bin

tanhieu
  • 86
  • 4