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: Giovanni Berti
Subject: Re: [Mingw-cross-env-list] Qt5 Linking failed (zlib?)
Date: Fri, 14 Nov 2014 23:35:35 +0100

Tried to build from master branch, still same errors:
$ make CROSS=i686-w64-mingw32
Automatic moc for target Test
Built target Test_automoc
Linking CXX executable Test.exe
/home/user/mxe/usr/i686-w64-mingw32.static/qt5/lib/libQt5Core.a(qbytearray.o):qbytearray.cpp:(.text+0x64c):
undefined reference to `uncompress'
/home/user/mxe/usr/i686-w64-mingw32.static/qt5/lib/libQt5Core.a(qbytearray.o):qbytearray.cpp:(.text+0x1768):
undefined reference to `compress2'
/home/user/mxe/usr/bin/i686-w64-mingw32.static-ld:
/home/giova/mxe/usr/i686-w64-mingw32.static/qt5/lib/libQt5Core.a(qbytearray.o):
bad reloc address 0x13 in section
`.text$_ZN5QListI10QByteArrayE6appendERKS0_[__ZN5QListI10QByteArrayE6appendERKS0_]'
/home/user/mxe/usr/bin/i686-w64-mingw32.static-ld: final link failed:
Invalid operation
collect2: error: ld returned 1 exit status
CMakeFiles/Test.dir/build.make:115: recipe for target 'Test.exe' failed
make[2]: *** [Test.exe] Error 1
CMakeFiles/Makefile2:60: recipe for target 'CMakeFiles/Test.dir/all' failed
make[1]: *** [CMakeFiles/Test.dir/all] Error 2
Makefile:76: recipe for target 'all' failed
make: *** [all] Error 2

What can I do now?
Giovanni

2014-11-13 10:03 GMT+01:00 Mark Brand <address@hidden>:
>
> 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]