[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Mingw-cross-env-list] QT 4.7.0 p1 qjpeg plug-in missing symbols pro
Re: [Mingw-cross-env-list] QT 4.7.0 p1 qjpeg plug-in missing symbols problem
Mon, 21 Jun 2010 21:30:14 +0200
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:188.8.131.52) Gecko/20100608 SUSE/3.1.0 Thunderbird/3.1
Hit a snag with qjpeg plug-in on Qt 4.7.0 on mingw-cross, happens on both Linux
and OSX qt builds.
/opt/mingw/usr/bin/i686-pc-mingw32-qmake -o Makefile qjpeg-test.pro
make -f Makefile.Release
i686-pc-mingw32-g++ -enable-stdcall-fixup -Wl,-enable-auto-import
-Wl,-enable-runtime-pseudo-reloc -static -Wl,-s -Wl,-subsystem,console
-mthreads -Wl -o release/qjpeg-test.exe release/main.o
-L/opt/mingw/usr/i686-pc-mingw32/plugins/imageformats -lqjpeg -lqgif -lqico
-lqsvg -lQtSvg -lQtGui -lgdi32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -lwinspool
-lmsimg32 -lQtCore -lpng -lkernel32 -luser32 -lshell32 -luuid -lole32
-ladvapi32 -lws2_32 -lz
undefined reference to `_jpeg_destroy_decompress'
Seems like qjpeg plugin library can not find the symbols in libjpeg.a, though
libjpeg.a is definitely there and has the symbols in question.
The problem is that "-ljpeg" is missing from the g++ call. It's not your
fault. I guess we should blame qmake for not realizing that the qjpeg
plug-in depends on this.
The same thing happens for qtiff too if you add "qtiff" to QTPLUGIN.
You can help qmake by adding "jpeg" to your QTPLUGIN directive in the
.pro file. I think this will work in your .pro file:
QTPLUGIN += qtiff tiff \
qjpeg jpeg \
Of course, if you are willing to use Qt as a shared library you can
avoid these problems altogether.
Removing qjpeg plugin from the project allows it to build... so svg, gif and
ico plugins are okay.
I'm guessing svg works because of -lQtSvg and that gif and ico work
because of -lQtGui.
I wonder could it be trying to link against the native libs as I see "
-system-libjpeg \" in qt.mk:66? Would that cause the linker to barf as if there
were no symbols?
No, "-system-libjpeg" just configures Qt to use the "system" jpeg
library instead of the jpeg code that ships with Qt. In our case, the
"system" jpeg is the one provided by mingw-cross-env.