Building Qt Desktop for Windows with MinGW or MinGW-w64

Do I need to build Qt?

Perhaps not. The official Qt SDk installer will work just fine. Follow these steps only if you want to learn how to make a cutom build.
p. Needed if you aim x64 target.

Required SDKs and tools

Here are the tools required to build a Qt Shared or a Qt Static library. First, please, download:

  1. Qt source code: Get the .tar.gz from http://qt.nokia.com/downloads or checkout a copy from http://qt.gitorious.org/qt/qt
  2. On machines not having a previous Qt version already installed you need to install also Perl (e.g. ActivePerl [activestate.com] ) prior to configure. Otherwise you may receive following error message at the end of configure:
    > Perl not found in environment – cannot run syncqt.
  3. MinGW: Get MinGW (?) (What version? Where? OK to use copy from a separate Qt SDK install?)
  4. MinGW-w64 : http://mingw-w64.sourceforge.net/

Filesystem setup

place unzip downloaded files? A concrete example like c:\myqt, would be good. We want to be sure not to require or interfere with a parallel Qt SDK install.

Command shell setup

Just use MinGW shell? QtMinGW shell? We want to be sure not to require or interfere with a parallel Qt SDK install.

Build configuration

including talk of “release vs debug” and “static vs dynamic”. Multi-core build process?

How to use your freshly built copy of Qt

Example using hand-made .pro file.

TODO

Example using Qt Creator

TODO

Debugging 64 bits process with gdb/MinGW-w64

TODO

See : http://qt-project.org/faq/answer/how_can_i_set_up_my_environment_for_building_qt_qt_applications_with_mingw

Categories: