LibQt5Network fails to build on z_inflate references

  • Following the instructions for "building Qt Android on Windows": but I must have missed something. I got to the build steps and when I run mingw32-make the build dies with undefined references to various symbols starting with z_inflate. I'm a Qt noob so while I can track down the needed source code I'm not sure what to do with it once I have it. This is part of zlib, yes?

    Relevant compiler output is:

    @mingw32-make.exe[4]: Entering directory 'c:/Qt/Android/qt5/qtbase/src/network'
    g++ -Wl,-s -shared -Wl,--out-implib,C:\Qt\Android\qt5\qtbase\lib\libQt5Network.a -o ....\lib\Qt5Network.dll object_script.Qt5Network.Release -lws2_32 -ldnsapi -ladvapi32 -LC:/Qt/Android/qt5/qtbase/lib -lQt5Core .obj\release_shared\Qt5Network_resource_res.o
    Creating library file: C:\Qt\Android\qt5\qtbase\lib\libQt5Network.a
    ./.obj\release_shared\qhttpnetworkreply.o:qhttpnetworkreply.cpp:(.text+0x190e): undefined reference to z_inflateEnd' ./.obj\release_shared\qhttpnetworkreply.o:qhttpnetworkreply.cpp:(.text+0x245f): undefined reference toz_inflateEnd'
    ./.obj\release_shared\qhttpnetworkreply.o:qhttpnetworkreply.cpp:(.text+0x3071): undefined reference to z_inflate' ./.obj\release_shared\qhttpnetworkreply.o:qhttpnetworkreply.cpp:(.text+0x32ba): undefined reference toz_inflateEnd'
    ./.obj\release_shared\qhttpnetworkreply.o:qhttpnetworkreply.cpp:(.text+0x3302): undefined reference to z_inflateInit2_' ./.obj\release_shared\qhttpnetworkreply.o:qhttpnetworkreply.cpp:(.text+0x483b): undefined reference toz_inflateInit2_'
    collect2: ld returned 1 exit status
    Makefile.Release:236: recipe for target '....\lib\Qt5Network.dll' failed
    mingw32-make.exe[4]: *** [....\lib\Qt5Network.dll] Error 1
    mingw32-make.exe[4]: Leaving directory 'c:/Qt/Android/qt5/qtbase/src/network'
    Makefile:34: recipe for target 'release' failed
    mingw32-make.exe[3]: *** [release] Error 2
    mingw32-make.exe[3]: Leaving directory 'c:/Qt/Android/qt5/qtbase/src/network'
    Makefile:182: recipe for target 'sub-network-make_first' failed
    mingw32-make.exe[2]: *** [sub-network-make_first] Error 2
    mingw32-make.exe[2]: Leaving directory 'c:/Qt/Android/qt5/qtbase/src'
    Makefile:40: recipe for target 'sub-src-make_first' failed
    mingw32-make.exe[1]: *** [sub-src-make_first] Error 2
    mingw32-make.exe[1]: Leaving directory 'c:/Qt/Android/qt5/qtbase'
    Makefile:57: recipe for target 'module-qtbase-make_first' failed
    mingw32-make.exe: *** [module-qtbase-make_first] Error 2@


  • any update on this? Same issue here. I'm trying to compile Qt 5.1 beta 1

    //edit: this only happens when I try to cross compile with xplatform android

  • I think you answered your own question in your first post:

    I had the same link error while building on MinGW. I got past it by building and installing zlib. HTH.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.