Problems with Open-Source Downloads read https://www.qt.io/blog/problem-with-open-source-downloads and https://forum.qt.io/post/638946

getting zlib to work with qt creator's mingw-32



  • Hello,

    merqt about 9 hours ago

    Hello,

    My attempt to run a [qt](lhttps://github.com/albar965/atools/blob/master/atools.pro project with qmake results in the errors:

    C:\Projekte\atools\src\zip\zip.cpp:-1: error: undefined reference to inflateEnd' C:\Projekte\atools\src\zip\zip.cpp:-1: error: undefined reference tocrc32'
    qtmain_win.cpp:-1: error: undefined reference to `qMain(int, char**)'

    I understand, from discussions and forums, that it is due to zlib package issue for windows 7
    Could anyone please guide me on what steps to take to resolve the error?

    Thank you


  • Lifetime Qt Champion

    Hi,

    IIRC, there was already a thread related to something similar last week. Basically on Windows, the trick was to manually built the zlib stuff included with Qt.



  • @SGaist Thank you. Could you please share some link which details how i need to go about this process?



  • @SGaist As of now, the errors have vanished when I added "LIBS+= -lz" to the win32 section of the pro file.
    But the error remaining is:
    C:\Qt\5.11.2\mingw53_32\lib\libqtmain.a(qtmain_win.o):qtmain_win.cpp:(.text+0x12e): undefined reference to `qMain(int, char**)'


  • Lifetime Qt Champion

    In what part do you get that ?



  • @SGaist When I run qmake, but i could resolve that when i added TEMPLATE = lib
    However i am getting a lot of errors when i try to build the main application.
    Could you please guide me with this?


  • Lifetime Qt Champion

    Where exactly did you modify that ?



  • @SGaist I was able to get atools to build without errors. But when i try to build littlenavmap there is an error related to java compiler:
    :-1: error: error: ..\littlenavmap\customize\icons.zip: Java compiler not installed on this system

    We have installed java compiler, nevertheless the error persists. Could you please guide?

    Thank you



  • @merqt said in getting zlib to work with qt creator's mingw-32:

    We have installed java compiler

    Even with that, are you sure that is it available (i.e. in the path) for your build process?

    error: error: ..\littlenavmap\customize\icons.zip: Java compiler not installed on this system

    Could you describe how are you doing the build that leads to this message? i.e. build from Qt Creator? from command line?



  • @Pablo-J.-Rogina Thank you. This error vanished once i replaced the .pro file with the one the developer of littlenavmap had shared
    Could you please help me understand one more thing?
    I cloned the project and imported it as it was into Qt Creator. I then ran qmake and built it. But I do not understand when or how the .pro file got changed and why this happens

    Thank you



  • @merqt said in getting zlib to work with qt creator's mingw-32:
    great you solved the issue

    error vanished once i replaced the .pro file with the one the developer of littlenavmap had shared

    could it be possible you attach that .pro file to this post for further reference?

    I do not understand when or how the .pro file got changed and why this happens

    it's hard to tell with no evidence.
    Did you keep the "faulty" .pro? so we can compare what changed and try to think about that?



  • @Pablo-J.-Rogina Thank you. What I noticed with Qt 5.11.2 this time was that when i import a project as qmake project, I am able to get the import done only if the .pro file is overwritten. If I uncheck the option to overwrite the .pro file, the project is not imported


Log in to reply