I’m starting to learn Qt and I’m stuck on particular step, which is: I cannot create executable file. My steps are as follows:
- Creation of *.cpp
- In console typing qmake -project (this creates .pro file)
- In console typing qmake -makefile (now I have makefile + some other files)
- I’m trying to create .exe by typing qmake but this isn’t working. I’ve also tried nmake, bmake and make but no results.
Any help will be appreciated.
Thank you.
It depends on what compiler you are using. If you’re using GCC or MinGW, type
make. Ifmakecannot be found, either it is not installed, or it’s not in your path (more likely to be the case). Try using the command prompt shortcut Qt provides you (if on Windows). If on a POSIX-based/-like system,makeshould exist. If it doesn’t, then it depends if you’re on a Mac or on Linux/BSD. On a Mac,makeshould come with the developer tools, which is one of the last CDs in the OS X installation CDs. If you’re on Linux, use your package manager.rpmfor Red Hat based systems,aptfor Debian based systems, and so on. Google about them.If you’re using Visual C++ and
nmakedoesn’t work, it could mean thatnmakeisn’t on your path. Try using the Visual C++ command prompt instead of the normal command prompt (should be somewhere in your start menu).It would be more helpful if you could mention how you installed Qt, and on what system.