mingw-cross-env-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Mingw-cross-env-list] Qt5 Linking failed (zlib?)


From: Mark Brand
Subject: Re: [Mingw-cross-env-list] Qt5 Linking failed (zlib?)
Date: Thu, 13 Nov 2014 10:03:43 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0


On 11/12/2014 08:03 PM, Giovanni Berti wrote:
Hello everyone!
I was trying to build a Qt5 program with MXE. I built successfully Qt5 with
make qt5
then tried to build my program with
make CROSS=i686-pc-mingw32
and I get these errors:
[...]
Scanning dependencies of target Test
[ 66%] Building CXX object CMakeFiles/Test.dir/main.cpp.obj
Linking CXX executable Test.exe
/home/user/mxe/usr/i686-pc-mingw32/qt5/lib/libQt5Core.a(qbytearray.o):qbytearray.cpp:(.text+0x509):
undefined reference to `uncompress'
/home/user/mxe/usr/i686-pc-mingw32/qt5/lib/libQt5Core.a(qbytearray.o):qbytearray.cpp:(.text+0x141a):
undefined reference to `compress2'
/home/user/mxe/usr/lib/gcc/i686-pc-mingw32/4.8.1/../../../../i686-pc-mingw32/bin/ld:
/home/giova/mxe/usr/i686-pc-mingw32/qt5/lib/libQt5Core.a(qbytearray.o):
bad reloc address 0x44 in section
`.text$_ZN5QListI10QByteArrayED1Ev[__ZN5QListI10QByteArrayED1Ev]'
/home/user/mxe/usr/lib/gcc/i686-pc-mingw32/4.8.1/../../../../i686-pc-mingw32/bin/ld:
final link failed: Invalid operation
collect2: error: ld returned 1 exit status
[...]

I think these errors pop up because libQt5Core.a's object files are
not linked with zlib, so how do I solve this? Should I specify the
dependencies in the Makefile (or, in my case, in CMakeLists.txt)?

Thanks,
Giovanni



Giovanni,

It's possible that cmake support is not quite up to the level of qmake. It sounds indeed like the cmake configuration is missing the zlib dependency. If you are using MXE's "stable" branch, you might want to consider using the "master" branch instead since it has an up-to-date Qt 5.

Mark





reply via email to

[Prev in Thread] Current Thread [Next in Thread]