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