[Qt-interest] Anyone builded Qt on win64 (win 7) using mingw64 ?
Yves Bailly
yves.bailly at sescoi.fr
Tue Sep 27 08:39:35 CEST 2011
Hello all,
Le 26/09/2011 19:46, K. Frank a écrit :
> On Mon, Sep 26, 2011 at 11:03 AM, Zeljko<zeljko at holobit.net> wrote:
>> Hi,
>> Is it possible to build qt (eg. 4.7.4) on 64bit windows using mingw64 from
>> http://mingw-w64.sourceforge.net/ ?
I did build Qt 4.7.4 on Win7 using TDM-mingw64 (see http://tdm-gcc.tdragon.net/),
using GCC 4.5.2 at the time (not tried yet with the new 4.6.2).
Don't look too closely at the thousands of warnings...
Configure used:
> configure -release -no-incredibuild-xge -no-dsp -no-vcproj -qt-libjpeg -qt-libtiff -qt-libmng -qt-libpng -qt-zlib -qt-sql-sqlite -nomake examples -nomake demos -ltcg
> mingw32-make
One "minor" needed tweak was in src\corelib\global\qglobal.h, around line 1132.
The genuine lines are:
#if defined(Q_OS_WIN64)
typedef __int64 Q_LONG; /* word up to 64 bit signed */
typedef unsigned __int64 Q_ULONG; /* word up to 64 bit unsigned */
#else
typedef long Q_LONG; /* word up to 64 bit signed */
typedef unsigned long Q_ULONG; /* word up to 64 bit unsigned */
#endif
I changed those lines to:
#if defined(Q_OS_WIN64)
#if defined(__GNUC__)
typedef long long Q_LONG; /* word up to 64 bit signed */
typedef unsigned long long Q_ULONG; /* word up to 64 bit unsigned */
#else
typedef __int64 Q_LONG; /* word up to 64 bit signed */
typedef unsigned __int64 Q_ULONG; /* word up to 64 bit unsigned */
#endif
#else
typedef long Q_LONG; /* word up to 64 bit signed */
typedef unsigned long Q_ULONG; /* word up to 64 bit unsigned */
#endif
...as it seems Qt incorrectly assume having WIN64, _WIN64, etc. defined implies
we're using MS compiler. Note my "fix" is probably only correct for GCC and MSVC,
another compiler might still not work.
Hope this helps.
--
/- Yves Bailly - Software developper -\
\- Sescoi R&D - http://www.sescoi.fr -/
"The possible is done. The impossible is being done. For miracles,
thanks to allow a little delay."
More information about the Qt-interest-old
mailing list