Explained: The Qt Build Flow

More topics Explained

The Qt Build Flow can sometimes seem a bit confusing. Qt is built using the standard C++ tooling, but some additional intermediate files are generated along the way. In this Explained we look at how this works.

An ordinary C++ build flow consists of source files (*.cpp), including header files (*.h), being run through a compiler to produce object files which are linked to a binary. The binary be be a shared library, e.g. a *.so or *.dll depending on your platform.

The Qt Build Flow visualized

Qt introduces three additional compilers generating source and header files:

All of the files generated by the Qt tools are ordinary C++ source and header files, which are compiled by the C++ compiler of your system. This means that all you need to build a Qt application is Qt, and a modern C++ compiler.

The details of this is handled by the build system of your choice, be it qmake, cmake, qbs, or something else. However, it is still useful to know about these details and which files are sources and which are generated intermediate files.

The Koderize Explained series is a series of tutorials explaining common concepts within the areas that Koderize works. If you want our help in development, training, or coaching, please contact us regarding our services.

More topics Explained