nav-left cat-right
cat-right
Home » Blog » 2008 » Februar

Qt with MinGW...

Contrary to what I have done previously I now want to use Qt4 under Windows without Visual Studio and its Compiler. That brings me to MinGW. In the following you find an instruction for the installation of all components

Note: I do not use the standalone Version of MinGW, since Qt complained during installtion that this would be incompatible with Qt.

  1. The first step is to download the opensource Edition of Qt with MinGW (download). Take care you do not select the Version 4.3.3, since that version does not work together with mingw and is thus totally unusable (Link to Bug). During the installation of Qt MinGW is downloaded and installed.
    I typically choose the following directories
    • Qt: C:\Programme\Qt\4.3.2
    • MinGW: C:\Programme\MinGW-Qt-4.3.2
  2. The installation directores have to be included in the PATH of the System.
  3. MinGW does not include the Debugger by default. Therefore we have to download the GDB Debugger manually and unzip it in the MinGW Directory.
  4. Some Editors rely on ctags. This is also downloaded and unziped into a Directory inside C:\Programme.
  5. Qt Installs the source code and its release versions. We however need the debug version also. Therefore we start the compilation of Qt from the script “Qt 4.3.2 (Build Debug Libraries)” found in the startmenu of QT
  6. Now we need an Editor. There are several IDEs available (Qt IDEs.) However some of the do not provide DLLs in their installation which can make it impossible to start them. I could test Qdevelop and Eclipse so far. Others are Monkey Studio, HaiQ and Eedyuk.
    • Qdevelop. Basic IDE with all necessary functions. I however crashes frequently which makes it unusable. If it only would become really stable I would recommend it.
    • Eclipse with the Qt Integration (from Trolltech). This IDE has a very good integration of C++ and Qt. It however requires some time to find the right functions. For example the .pro projects are loaded by “Import” and the Signal/Slot Viewer is enabled in the Window->Show View->Other (select Qt->Signal slot Editor). If you find at first not project view minimize the current view. But after some time one has found everything and can work fast with the environment.
Thats it. Load an Project in your favorite Editor and compile it. If it does not work, and you know it is due to an error in my list please let me know.

Qt IDEs...

Currently I am testing several IDEs to use them as a new development platform for Qt Applications. First there is the commercial Part
  • Visual Studio

I might be interested on How to integrate qt with Visual Studio. I however am looking for a IDE with better integration of Qt and less useless functions (they are for me useless, since I do not need most of the functionality)

The next one is a highly developed and tested platform There are some projects, with IDEs developed with Qt for Qt. All of them are open source.
  • QDevelop (Test with QDevelop-0.25.2-1-setup.exe)
    I has nearly all features I require. I experienced however a crash everytime I used it.
  • HaiQ (see note below)
  • Monkey Studio/ (see note below)
  • Eedyuk
    No stable binary release up to now. (see note below)

Note: HaiQ and Monkey Studio do not provide their own Qt DLLs. In my case, and with all my coworkers that results in a error such as

Der Prozedureinsprungspunkt “_Z11qUncompessPKhi” wurde in der DLL “QtCore4.dll” nicht gefunden.

This error comes if one has Qt DLLs, not build with MinGW on the system which are included in PATH. In my case it was Matlab or Miktex with the path c:\programme\Matlab\R2007a\bin\win32;C:\Programme\MiKTeX 2.7\miktex\bin. The only solution to this problem is to delete all paths from the PATH variable which contain a Qt DLL. This however can prevent these programms from starting.

There are also projects, not build with Qt and not designed for Qt
  • Code::Blocks
    Current Version: 1.0rc2 (2005-10-25). New releases are only available as snapshots. From this old release to this new development ones the core has been rewritten in main parts according to their website. However not releasing a stable version for 3 years makes the reliability of the development quite doubtful.
    Qt Integration Plugins are hard to find and mainly in alpha stage
Though not tested yet, Code:Blocks seems not to be a good candiate for Qt development.