Thu, 10 Aug 2006

qmake - compiling

To compile a C++ application you need to create a makefile. The easiest way to
create a makefile is to use the qmake build tool supplied with Qt. If you've
saved main.cpp in its own directory, all you have to do is: 

qmake -project -o main.pro      // this creates a project file main.pro

qmake                           // this creates the Makefile

make                            // this creates the executable

The first command tells qmake to create a .pro (project) file. The second
command tells it to create a (platform-specific) makefile based on the project
file. You should now be able to type make (or nmake if you're using Visual
Studio).

Posted at: 21:27 | category: /dev | Comments ()