kann QT nicht statisch linken

Verschiedenes zu Qt
Antworten
GoaSkin
Beiträge: 103
Registriert: 13. Juni 2007 00:14
Wohnort: Darmstadt

kann QT nicht statisch linken

Beitrag von GoaSkin »

Hallo,

wenn ich QT für Windows statisch kompilieren möchte, scheitert make dann, wenn es darum geht, die Tools zu linken. Dann sind Symbole nicht mehr auflösbar:

Code: Alles auswählen

c:\Qt\2010.02\qt\lib/libQtWebKit.a(MediaPlayerPrivatePhonon.o):MediaPlayerPrivat
ePhonon.cpp:(.text+0x44d): undefined reference to `_imp___ZNK6Phonon11MediaObjec
t5stateEv'
c:\Qt\2010.02\qt\lib/libQtWebKit.a(MediaPlayerPrivatePhonon.o):MediaPlayerPrivat
ePhonon.cpp:(.text+0x474): undefined reference to `_imp___ZN6Phonon11MediaObject
5pauseEv'
c:\Qt\2010.02\qt\lib/libQtWebKit.a(MediaPlayerPrivatePhonon.o):MediaPlayerPrivat
ePhonon.cpp:(.text+0x496): undefined reference to `_imp___ZNK6Phonon11MediaObjec
t5stateEv'
c:\Qt\2010.02\qt\lib/libQtWebKit.a(MediaPlayerPrivatePhonon.o):MediaPlayerPrivat
ePhonon.cpp:(.text+0x565): undefined reference to `_imp___ZN6Phonon11MediaObject
5pauseEv'
c:\Qt\2010.02\qt\lib/libQtWebKit.a(MediaPlayerPrivatePhonon.o):MediaPlayerPrivat
ePhonon.cpp:(.text+0x590): undefined reference to `_imp___ZNK6Phonon11MediaObjec
t9errorTypeEv'
c:\Qt\2010.02\qt\lib/libQtWebKit.a(MediaPlayerPrivatePhonon.o):MediaPlayerPrivat
ePhonon.cpp:(.text+0x5a1): undefined reference to `_imp___ZN6Phonon11MediaObject
5pauseEv'
c:\Qt\2010.02\qt\lib/libQtWebKit.a(MediaPlayerPrivatePhonon.o):MediaPlayerPrivat
ePhonon.cpp:(.text+0x67f): undefined reference to `_imp___ZN6Phonon11AudioOutput
8setMutedEb'
c:\Qt\2010.02\qt\lib/libQtWebKit.a(MediaPlayerPrivatePhonon.o):MediaPlayerPrivat
ePhonon.cpp:(.text+0x6a8): undefined reference to `_imp___ZN6Phonon11AudioOutput
9setVolumeEd'
c:\Qt\2010.02\qt\lib/libQtWebKit.a(MediaPlayerPrivatePhonon.o):MediaPlayerPrivat
ePhonon.cpp:(.text+0x711): undefined reference to `_imp___ZNK6Phonon11MediaObjec
t11currentTimeEv'
c:\Qt\2010.02\qt\lib/libQtWebKit.a(MediaPlayerPrivatePhonon.o):MediaPlayerPrivat
ePhonon.cpp:(.text+0x748): undefined reference to `_imp___ZNK6Phonon11MediaObjec
t9totalTimeEv'
c:\Qt\2010.02\qt\lib/libQtWebKit.a(MediaPlayerPrivatePhonon.o):MediaPlayerPrivat
ePhonon.cpp:(.text+0x796): undefined reference to `_imp___ZNK6Phonon11MediaObjec
t10isSeekableEv'
c:\Qt\2010.02\qt\lib/libQtWebKit.a(MediaPlayerPrivatePhonon.o):MediaPlayerPrivat
ePhonon.cpp:(.text+0x7e0): undefined reference to `_imp___ZN6Phonon11MediaObject
4seekEx'
c:\Qt\2010.02\qt\lib/libQtWebKit.a(MediaPlayerPrivatePhonon.o):MediaPlayerPrivat
ePhonon.cpp:(.text+0x814): undefined reference to `_imp___ZN6Phonon11MediaObject
4playEv'
c:\Qt\2010.02\qt\lib/libQtWebKit.a(MediaPlayerPrivatePhonon.o):MediaPlayerPrivat
ePhonon.cpp:(.text+0x834): undefined reference to `_imp___ZNK6Phonon11MediaObjec
t8hasVideoEv'
c:\Qt\2010.02\qt\lib/libQtWebKit.a(MediaPlayerPrivatePhonon.o):MediaPlayerPrivat
ePhonon.cpp:(.text+0xa74): undefined reference to `_imp___ZN6Phonon11MediaObject
C1EP7QObject'
c:\Qt\2010.02\qt\lib/libQtWebKit.a(MediaPlayerPrivatePhonon.o):MediaPlayerPrivat
ePhonon.cpp:(.text+0xa96): undefined reference to `_imp___ZN6Phonon11VideoWidget
C1EP7QWidget'
c:\Qt\2010.02\qt\lib/libQtWebKit.a(MediaPlayerPrivatePhonon.o):MediaPlayerPrivat
ePhonon.cpp:(.text+0xab8): undefined reference to `_imp___ZN6Phonon11AudioOutput
C1EP7QObject'
c:\Qt\2010.02\qt\lib/libQtWebKit.a(MediaPlayerPrivatePhonon.o):MediaPlayerPrivat
ePhonon.cpp:(.text+0xb05): undefined reference to `_imp___ZN6Phonon10createPathE
PNS_9MediaNodeES1_'
c:\Qt\2010.02\qt\lib/libQtWebKit.a(MediaPlayerPrivatePhonon.o):MediaPlayerPrivat
ePhonon.cpp:(.text+0xb14): undefined reference to `_imp___ZN6Phonon4PathD1Ev'
c:\Qt\2010.02\qt\lib/libQtWebKit.a(MediaPlayerPrivatePhonon.o):MediaPlayerPrivat
ePhonon.cpp:(.text+0xf2d): undefined reference to `_imp___ZN6Phonon11MediaSource
C1ERK4QUrl'
c:\Qt\2010.02\qt\lib/libQtWebKit.a(MediaPlayerPrivatePhonon.o):MediaPlayerPrivat
ePhonon.cpp:(.text+0xf3d): undefined reference to `_imp___ZN6Phonon11MediaObject
16setCurrentSourceERKNS_11MediaSourceE'
c:\Qt\2010.02\qt\lib/libQtWebKit.a(MediaPlayerPrivatePhonon.o):MediaPlayerPrivat
ePhonon.cpp:(.text+0xf46): undefined reference to `_imp___ZN6Phonon11MediaSource
D1Ev'
c:\Qt\2010.02\qt\lib/libQtWebKit.a(MediaPlayerPrivatePhonon.o):MediaPlayerPrivat
ePhonon.cpp:(.text+0xf81): undefined reference to `_imp___ZN6Phonon11AudioOutput
9setVolumeEd'
c:\Qt\2010.02\qt\lib/libQtWebKit.a(MediaPlayerPrivatePhonon.o):MediaPlayerPrivat
ePhonon.cpp:(.text+0xfec): undefined reference to `_imp___ZN6Phonon11MediaSource
D1Ev'
c:\Qt\2010.02\qt\lib/libQtWebKit.a(MediaPlayerPrivatePhonon.o):MediaPlayerPrivat
ePhonon.cpp:(.text+0x1058): undefined reference to `_imp___ZN6Phonon11MediaObjec
tC1EP7QObject'
c:\Qt\2010.02\qt\lib/libQtWebKit.a(MediaPlayerPrivatePhonon.o):MediaPlayerPrivat
ePhonon.cpp:(.text+0x107a): undefined reference to `_imp___ZN6Phonon11VideoWidge
tC1EP7QWidget'
c:\Qt\2010.02\qt\lib/libQtWebKit.a(MediaPlayerPrivatePhonon.o):MediaPlayerPrivat
ePhonon.cpp:(.text+0x109c): undefined reference to `_imp___ZN6Phonon11AudioOutpu
tC1EP7QObject'
c:\Qt\2010.02\qt\lib/libQtWebKit.a(MediaPlayerPrivatePhonon.o):MediaPlayerPrivat
ePhonon.cpp:(.text+0x10e9): undefined reference to `_imp___ZN6Phonon10createPath
EPNS_9MediaNodeES1_'
c:\Qt\2010.02\qt\lib/libQtWebKit.a(MediaPlayerPrivatePhonon.o):MediaPlayerPrivat
ePhonon.cpp:(.text+0x10f8): undefined reference to `_imp___ZN6Phonon4PathD1Ev'
collect2: ld returned 1 exit status
mingw32-make[9]: *** [..\..\..\..\bin\assistant.exe] Error 1
mingw32-make[9]: Leaving directory `C:/Qt/2010.02/qt/tools/assistant/tools/assis
tant'
mingw32-make[8]: *** [release] Error 2
mingw32-make[8]: Leaving directory `C:/Qt/2010.02/qt/tools/assistant/tools/assis
tant'
mingw32-make[7]: *** [all] Error 2
mingw32-make[7]: Leaving directory `C:/Qt/2010.02/qt/tools/assistant/tools/assis
tant'
mingw32-make[6]: *** [sub-assistant-make_default-ordered] Error 2
mingw32-make[6]: Leaving directory `C:/Qt/2010.02/qt/tools/assistant/tools'
mingw32-make[5]: *** [all] Error 2
mingw32-make[5]: Leaving directory `C:/Qt/2010.02/qt/tools/assistant/tools'
mingw32-make[4]: *** [sub-tools-make_default-ordered] Error 2
mingw32-make[4]: Leaving directory `C:/Qt/2010.02/qt/tools/assistant'
mingw32-make[3]: *** [all] Error 2
mingw32-make[3]: Leaving directory `C:/Qt/2010.02/qt/tools/assistant'
mingw32-make[2]: *** [sub-assistant-make_default-ordered] Error 2
mingw32-make[2]: Leaving directory `C:/Qt/2010.02/qt/tools'
mingw32-make[1]: *** [all] Error 2
mingw32-make[1]: Leaving directory `C:/Qt/2010.02/qt/tools'
mingw32-make: *** [sub-tools-make_default-ordered] Error 2
Die gleichen Fehler tauchen auch auf, wenn ich ein eigenes Programm versuche, statisch zu linken, nachdem sub-src erstellt wurde. Ich habe von 2010.04 auf 2010.02 downgegradet, weil irgendwer behauptete, dass der geschilderte Fehler speziell bei 2010.03 und 2010.04 auftritt aber Pustekuchen.
Ich verwende das mit QT mitgelieferte MinGW und Windows 7.

configure Optionen sind -static -fast -release -no-qt3support

Experimentell habe ich auch mal -no-phonon probiert. Macht keinen Unterschied und selbst dann werden immernoch Phonon-Symbole vermisst.

Jemand eine Idee?
grog
Beiträge: 63
Registriert: 14. November 2009 21:33

Re: kann QT nicht statisch linken

Beitrag von grog »

GoaSkin hat geschrieben:Hallo,

wenn ich QT für Windows statisch kompilieren möchte, scheitert make dann, wenn es darum geht, die Tools zu linken. Dann sind Symbole nicht mehr auflösbar:

Code: Alles auswählen

c:\Qt\2010.02\qt\lib/libQtWebKit.a(MediaPlayerPrivatePhonon.o):MediaPlayerPrivat
...
Statisch _und_ WebKit geht nicht.

Hast Du einen guten Grund, ueberhaupt ein statisches Qt bauen zu wollen?
ScyllaIllciz
Beiträge: 200
Registriert: 9. Juli 2010 19:31

Beitrag von ScyllaIllciz »

Statisch _und_ WebKit geht nicht.

Hast Du einen guten Grund, ueberhaupt ein statisches Qt bauen zu wollen?
Wieso soll das nicht gehen? Hier geht das ohne Probleme und gute Gründe gibt es immer, laut Qt selbst schon alleine aus performance Gründen!!!
grog
Beiträge: 63
Registriert: 14. November 2009 21:33

Beitrag von grog »

ScyllaIllciz hat geschrieben:
Statisch _und_ WebKit geht nicht.
...
Wieso soll das nicht gehen? Hier geht das ohne Probleme und gute Gründe gibt es immer, laut Qt selbst schon alleine aus performance Gründen!!!
"geht nicht" ist knapp formuliert fuer "geht nicht ohne besonderen Aufwand".

Wenn es ohne Aufwand gehen wuerde, waere der urspruengliche Beitrag nicht geschrieben worden, ebenso wenig wie [url=http://blog.chaz6.com/2008/09/how-to-bu ... tatic.html] oder [url=http://stackoverflow.com/questions/2528 ... bkit-4-6-2]

Der Performanzgewinn duerfte im Uebrigen marginal sein, wenn ueberhaupt messbar. Der Text, auf den Du verlinkst, scheint in neueren Versionen der Dokumentation auch nicht mehr aufzutauchen.
Antworten