Results 1 to 10 of 10

Thread: Building Qt 4.4.3 with GCC 4.3.2 on Windows XP

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2008
    Posts
    7
    Thanked 5 Times in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Building Qt 4.4.3 with GCC 4.3.2 on Windows XP

    1.Download GCC 4.3.2: http://www.tdragon.net/recentgcc/ click "TDM/MinGW Installer 1.808.3" to download and install;

    2.Download Qt 4.4.3: ftp://ftp.trolltech.com/qt/source/qt....4.3-mingw.exe and install it. You will get a warning, just click OK to ignore;

    3.In your System Environment's PATH, add YourMinGWDir\bin and YourQtDir\4.4.3\bin;

    4.There are some bugs in Qt 4.4.3. Please fix them:

    (1) Qt\4.4.3\src\corelib\arch\qatomic_windows.h: check line 386-392, they should be:
    extern “C” {
    __declspec(dllimport) long __stdcall InterlockedCompareExchange(long *, long, long);
    __declspec(dllimport) long __stdcall InterlockedIncrement(long *);
    __declspec(dllimport) long __stdcall InterlockedDecrement(long *);
    __declspec(dllimport) long __stdcall InterlockedExchange(long *, long);
    __declspec(dllimport) long __stdcall InterlockedExchangeAdd(long *, long);
    }
    Please modify them like below:
    extern “C” {
    __declspec(dllimport) long __stdcall InterlockedCompareExchange(volatile long *, long, long);
    __declspec(dllimport) long __stdcall InterlockedIncrement(volatile long *);
    __declspec(dllimport) long __stdcall InterlockedDecrement(volatile long *);
    __declspec(dllimport) long __stdcall InterlockedExchange(volatile long *, long);
    __declspec(dllimport) long __stdcall InterlockedExchangeAdd(volatile long *, long);
    }

    (2) Qt\4.4.3\src\corelib\io\qfsfileengine_win.cpp: check line 67-68, they should be:
    #define SECURITY_WIN32
    #include <security.h>
    Add a line between them #include <subauth.h>, like these lines below:
    #define SECURITY_WIN32
    #include <subauth.h>
    #include <security.h>

    (3) Qt\4.4.3\src\gui\inputmethod\qwininputcontext_win. cpp: check line 500, it should be:
    bool QWinInputContext::endComposition()
    Please add a line above it: extern bool qt_sendSpontaneousEvent(QObject *, QEvent *); ,like these lines blow:
    extern bool qt_sendSpontaneousEvent(QObject *, QEvent *);
    bool QWinInputContext::endComposition()

    5.OK. It's time to compile. Click "Start"->"Qt by Nokia v4.4.3 (OpenSource)"->"Qt 4.4.3 Command Prompt", then enter "configure -debug-and-release -plugin-sql-sqlite -plugin-sql-odbc -qt-libpng -qt-libjpeg" and enter to configure. After several minutes, configure will done. And enter "mingw32-make" and enter to compile. It may take about 3 hours to make. It should take 4G harddisk place.

  2. The following 5 users say thank you to shiyutang for this useful post:

    ComaWhite (14th March 2009), pastor (2nd November 2008), piotr.dobrogost (15th July 2009), shirazk (27th October 2008), yuniarto.rahardjo (1st December 2008)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.