Time for action – configuring and building Qt

Having the sources in place, we can start building the framework. To do that, in addition to a supported compiler, you will need Perl and Python (Version 2.7 or later) installed. For Windows, you will also need Ruby. If you are missing any of the tools, it's a good time to install them. Afterwards, open the command line and change the current working directory to the one containing the Qt source code. Then, issue the following command:

configure -opensource -nomake tests

This will launch a tool that detects whether all the requirements are met and will report any inconsistencies. It will also report the exact configuration of the build. You can customize the build (for example, if you need to enable or disable some features or cross-compile Qt for an embedded platform) by passing additional options to configure. You can see the available options by running configure with the -help switch.

If configure reports problems, you will have to fix them and restart the tool. Otherwise, start the build process by invoking make (or an equivalent like mingw32-make if using MinGW or nmake if using MSVC).

Tip

Instead of nmake, you can use a tool called jom that is bundled with Qt. It will reduce the compilation time on multicore machines, which is what the default nmake tool can't do. For make and mingw32-make, you can pass the -j N parameter, where N stands for the number of cores in your machine.

What just happened?

After some time (usually less than an hour), if all goes well, the build should be complete and you will be ready to add the compiled framework to the list of kits available in Qt Creator.

Tip

In Unix systems after the build gets completed, you can invoke a make install command with super-user privileges (obtained for example, with sudo) to copy the framework to a more appropriate place.