[Qt-interest] build of qt 4.4.3 with mingw fails on Windows 7 due to conflicting InterlockedCompareExchange

mail at philippmuenzel.de mail at philippmuenzel.de
Sat Jun 5 23:05:31 CEST 2010


Hi folks,

I'm setting up a new Win7/64 rig for development. For backporting purposes, I need a Qt v 4.4.3 installation.

I tried both Ming with gcc 4.4.1 that is shipped with CodeBlocks and mingw with gcc 3.4.5 that can be downloaded with the mingw installer from sourceforge. Both tries, I configured with

configure.exe -release -shared -no-sql-sqlite -no-qt3support -no-vcproj -no-phonon -no-phonon-backend -no-webkit -platform win32-g++

with success, but running ming32-make fails with 

In file included from ..\..\include/QtCore/qatomic_windows.h:1,
                 from ..\..\include/QtCore/../../src/corelib/arch/qatomic_arch.h
:72,
                 from ..\..\include/QtCore/qatomic_arch.h:1,
                 from ..\..\include/QtCore/../../src/corelib/thread/qbasicatomic
.h:203,
                 from ..\..\include/QtCore/qbasicatomic.h:1,
                 from ..\..\include/QtCore/../../src/corelib/thread/qatomic.h:42
,
                 from ..\..\include/QtCore/qatomic.h:1,
                 from ..\..\include\QtCore/../../src/corelib/tools/qbytearray.h:
42,
                 from ..\..\include\QtCore/qbytearray.h:1,
                 from qtmain_win.cpp:39:
..\..\include/QtCore/../../src/corelib/arch/qatomic_windows.h:387: error: declar
ation of C function 'long int InterlockedCompareExchange(long int*, long int, lo
ng int)' conflicts with
c:\codeblocks\mingw\bin\../lib/gcc/mingw32/4.4.1/../../../../include/winbase.h:1
681: error: previous declaration 'LONG InterlockedCompareExchange(volatile LONG*
, LONG, LONG)' here
..\..\include/QtCore/../../src/corelib/arch/qatomic_windows.h:388: error: declar
ation of C function 'long int InterlockedIncrement(long int*)' conflicts with
c:\codeblocks\mingw\bin\../lib/gcc/mingw32/4.4.1/../../../../include/winbase.h:1
694: error: previous declaration 'LONG InterlockedIncrement(volatile LONG*)' her
e
..\..\include/QtCore/../../src/corelib/arch/qatomic_windows.h:389: error: declar
ation of C function 'long int InterlockedDecrement(long int*)' conflicts with
c:\codeblocks\mingw\bin\../lib/gcc/mingw32/4.4.1/../../../../include/winbase.h:1
685: error: previous declaration 'LONG InterlockedDecrement(volatile LONG*)' her
e
..\..\include/QtCore/../../src/corelib/arch/qatomic_windows.h:390: error: declar
ation of C function 'long int InterlockedExchange(long int*, long int)' conflict
s with
c:\codeblocks\mingw\bin\../lib/gcc/mingw32/4.4.1/../../../../include/winbase.h:1
686: error: previous declaration 'LONG InterlockedExchange(volatile LONG*, LONG)
' here
..\..\include/QtCore/../../src/corelib/arch/qatomic_windows.h:391: error: declar
ation of C function 'long int InterlockedExchangeAdd(long int*, long int)' confl
icts with
c:\codeblocks\mingw\bin\../lib/gcc/mingw32/4.4.1/../../../../include/winbase.h:1
690: error: previous declaration 'LONG InterlockedExchangeAdd(volatile LONG*, LO
NG)' here
mingw32-make[2]: *** [tmp/obj/release_shared/qtmain_win.o] Error 1
mingw32-make[2]: Leaving directory `C:/Qt/qt-all-opensource-src-4.4.3/src/winmai
n'
mingw32-make[1]: *** [release] Error 2
mingw32-make[1]: Leaving directory `C:/Qt/qt-all-opensource-src-4.4.3/src/winmai
n'
mingw32-make: *** [sub-winmain-sub_src_target_ordered] Error 2 

I clearly remember that I once built a Qt from the sources with mingw, but that was on WinXP/32.

So what is the problem here? Win7? 64bit? improper Qt sourcecode package? Faulty mingw installation?

Philipp



More information about the Qt-interest-old mailing list