Seite 1 von 1

Qt 4.4.3 mit MigWW 4.4.1 kompilieren auf Win 7: q_atomic

Verfasst: 5. Juni 2010 22:30
von PhilippM
Hallo,

ich habe hier ein neues System mit Win7 64bit aufgesetzt und versuch meine ganzen Development Tools wieder zum Laufen zu bringen.

Ich habe mir das neue CodeBlocks 10.05 mit Mingw-gcc-4.4.1 geholt und isntalliert, sowie den PATH zu mingw/bin angepasst. Dann habe ich mir die Qt-Sourcen geholt (nicht das SDK, nix vorkompiliertes, nur die Sourcen).

Ich konfiguriere eine minimalkonfiguration:
configure.exe -release -shared -no-sql-sqlite -no-qt3support -no-vcproj -no-phonon -no-phonon-backend -no-webkit -platform win32-g++

Das läuft einwandfrei durch und qmake wird gebaut. Wenn ich dann allerdings
mingw32-make sub-src
aufrufe, kommt folgender Fehler:

Code: Alles auswählen

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
Woran liegt das
-Windows 7 ?
-64bit ?
-Mingw 4.4.1?

Hilfe !!

Philipp

EDIT: Nochmal versucht mit der 3.4.5er mingw (was das Qt 4.4.3 in der windows-version mitinstalliert, wenn man es fragt), gleicher Fehler beim kompilieren der Sourcen. Ich bin mir aber ganz sicher, schonmal mit mingw Qt aus den Sourcen gebaut zu haben, allerdings wohl noch unter Windows XP. Wo liegt hier der Hund begraben?

Verfasst: 6. Juni 2010 09:41
von Christian81
Nimm eine aktuelle Qt-Version und fertig.

Verfasst: 6. Juni 2010 14:38
von PhilippM
Leider nicht möglich.
Für Backporting-Zwecke brauche ich zwingend Qt < 4.5.0.

Ich habe jetzt noch eine alte mingw installation mit gcc 3.4.2 gefunden, die kompilierts. Die muss ich wohl auf einer Festplatte in einem Bankschließfach sichern.

Phil