2010-09-03 8 views
0

J'essaye de relier mon application QT à une DLL (libshout), tout en construisant pour Windows.Compilation de libshout en utilisant QT/qmake

J'ai ajouté les lignes appropriées à mon dossier .pro:

LIBS += -L/local/lib -lmp3lame 
LIBS += -L/local/lib -lshout 
LIBS += -L/local/lib -logg 
LIBS += -L/local/lib -lvorbis 
LIBS += -lwsock32 

J'ai aussi construit avec succès et installé à libshout/local/lib (j'utilise MinGW et le compilateur gcc-DW2).

Cependant, qmake ne parvient pas à lier correctement. J'ai collé la sortie gcc/make ci-dessous. Je ne suis même pas sûr qu'il essaie de lier à la bonne bibliothèque (n'est pas une bibliothèque statique .a/.la?).

J'ai déchire mes cheveux pendant 3 jours sur celui-ci de sorte que toute aide appréciée :)

g++-dw2 -c -O2 -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPP 
ORT -DQT_DLL -DQT_NO_DEBUG -DQT_WEBKIT_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CO 
RE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I'../../Qt/4.6.3/include/QtCore' -I 
'../../Qt/4.6.3/include/QtNetwork' -I'../../Qt/4.6.3/include/QtGui' -I'../../Qt/ 
4.6.3/include/QtWebKit' -I'../../Qt/4.6.3/include' -I'../../Qt/4.6.3/include/Act 
iveQt' -I'release' -I'../../Qt/4.6.3/mkspecs/win32-g++' -o release/qrc_resources 
.o release/qrc_resources.cpp 
g++-dw2 -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo 
-reloc -Wl,-s -mthreads -Wl -Wl,-subsystem,windows -o build/release/MyApp.exe ob 
ject_script.MyApp.Release -L'c:/Qt/4.6.3/lib' -lmingw32 -lqtmain -L/local/lib - 
lmp3lame -L/local/lib -lshout -lwsock32 -lQtWebKit4 -lQtGui4 -lQtNetwork4 -lQtCo 
re4 
C:/msys/1.0/local/lib/libshout.a(ogg.o): In function `free_codec': 
c:\myapp_app\external\libshout-2.2.2\src/ogg.c:188: undefined reference to `ogg_ 
stream_clear' 
C:/msys/1.0/local/lib/libshout.a(ogg.o): In function `close_ogg': 
c:\myapp_app\external\libshout-2.2.2\src/ogg.c:144: undefined reference to `ogg_ 
sync_clear' 
C:/msys/1.0/local/lib/libshout.a(ogg.o): In function `send_ogg': 
c:\myapp_app\external\libshout-2.2.2\src/ogg.c:90: undefined reference to `ogg_s 
ync_buffer' 
c:\myapp_app\external\libshout-2.2.2\src/ogg.c:92: undefined reference to `ogg_s 
ync_wrote' 
c:\myapp_app\external\libshout-2.2.2\src/ogg.c:94: undefined reference to `ogg_s 
ync_pageout' 
c:\myapp_app\external\libshout-2.2.2\src/ogg.c:95: undefined reference to `ogg_p 
age_bos' 
C:/msys/1.0/local/lib/libshout.a(ogg.o): In function `open_codec': 
c:\myapp_app\external\libshout-2.2.2\src/ogg.c:154: undefined reference to `ogg_ 
page_serialno' 
c:\myapp_app\external\libshout-2.2.2\src/ogg.c:154: undefined reference to `ogg_ 
stream_init' 
c:\myapp_app\external\libshout-2.2.2\src/ogg.c:155: undefined reference to `ogg_ 
stream_pagein' 
c:\myapp_app\external\libshout-2.2.2\src/ogg.c:160: undefined reference to `ogg_ 
stream_clear' 
C:/msys/1.0/local/lib/libshout.a(ogg.o): In function `send_ogg': 
c:\myapp_app\external\libshout-2.2.2\src/ogg.c:117: undefined reference to `ogg_ 
page_serialno' 
c:\myapp_app\external\libshout-2.2.2\src/ogg.c:119: undefined reference to `ogg_ 
stream_pagein' 
c:\myapp_app\external\libshout-2.2.2\src/ogg.c:94: undefined reference to `ogg_s 
ync_pageout' 
C:/msys/1.0/local/lib/libshout.a(ogg.o): In function `shout_open_ogg': 
c:\myapp_app\external\libshout-2.2.2\src/ogg.c:74: undefined reference to `ogg_s 
ync_init' 
C:/msys/1.0/local/lib/libshout.a(vorbis.o): In function `free_vorbis_data': 
c:\myapp_app\external\libshout-2.2.2\src/vorbis.c:103: undefined reference to `v 
orbis_info_clear' 
c:\myapp_app\external\libshout-2.2.2\src/vorbis.c:104: undefined reference to `v 
orbis_comment_clear' 
C:/msys/1.0/local/lib/libshout.a(vorbis.o): In function `read_vorbis_page': 
c:\myapp_app\external\libshout-2.2.2\src/vorbis.c:83: undefined reference to `vo 
rbis_synthesis_headerin' 
c:\myapp_app\external\libshout-2.2.2\src/vorbis.c:82: undefined reference to `og 
g_stream_packetout' 
c:\myapp_app\external\libshout-2.2.2\src/vorbis.c:91: undefined reference to `og 
g_stream_packetout' 
C:/msys/1.0/local/lib/libshout.a(vorbis.o): In function `vorbis_blocksize': 
c:\myapp_app\external\libshout-2.2.2\src/vorbis.c:110: undefined reference to `v 
orbis_packet_blocksize' 
C:/msys/1.0/local/lib/libshout.a(vorbis.o): In function `shout_open_vorbis': 
c:\myapp_app\external\libshout-2.2.2\src/vorbis.c:57: undefined reference to `vo 
rbis_info_init' 
c:\myapp_app\external\libshout-2.2.2\src/vorbis.c:58: undefined reference to `vo 
rbis_comment_init' 
c:\myapp_app\external\libshout-2.2.2\src/vorbis.c:60: undefined reference to `og 
g_stream_packetout' 
c:\myapp_app\external\libshout-2.2.2\src/vorbis.c:62: undefined reference to `vo 
rbis_synthesis_headerin' 
collect2: ld returned 1 exit status 
make[1]: *** [build/release/Myapp.exe] Error 1 
make[1]: Leaving directory `/c/myapp_app/src' 
make: *** [release] Error 2 

Répondre

0

Ma première hypothèse serait que libogg et libvorbis ne sont pas installés dans/local/lib, avez-vous vérifié qu'ils sont là?

Questions connexes