The following are instructions for installing Qt and compiling a demo application using the MinGW toolchain:
- Download the Qt 4.8.4 libraries installer here.
- Run the installer. If a warning message about the version of the
w32api.hfile appears ignore it and continue the installation (my install is version 3.17 and appears to work fine). - By default, the installer does not add the Qt toolchain to the PATH. Instead, it provides a custom command prompt environment called the "Qt 4.8.4 Command Prompt"; launch this command prompt from the Start menu.
- Now we can try compiling an example; from the Qt command prompt, navigate to
C:\Qt\4.8.4\demos\textedit. - Execute the command
qmake; this should generate a makefile. - Build the example using the command
make. - If everything goes correctly,
textedit.exeshould now exist in thedebugdirectory; launch the demo application.
That’s it! Your machine is now ready to build Qt apps using MinGw.