Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. 3rd Party Software
  4. Problem building quazip-Libary 0.5.1
Qt 6.11 is out! See what's new in the release blog

Problem building quazip-Libary 0.5.1

Scheduled Pinned Locked Moved 3rd Party Software
6 Posts 6 Posters 12.0k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    LVreg
    wrote on last edited by
    #1

    I have problems building the quazip libary (version 0.5.1) on Windows 7 (32-bit) with Qt 5.0.1 32-Bit LGPL installed.

    When i run in the Qt-Commandprompt:
    @ qmake
    mingw32-make @
    with the directory set to the folder in which I extracted Quazip (C:\Qt\quazip-0.5.1\quazip), I get the following output:
    @
    C:\Qt\quazip-0.5.1\quazip>mingw32-make
    mingw32-make -f Makefile.Release
    mingw32-make[1]: Entering directory 'C:/Qt/quazip-0.5.1/quazip'
    g++ -Wl,-s -shared -mthreads -Wl,--out-implib,release\libquazip.a -o release\qua
    zip.dll object_script.quazip.Release -LC:\Qt\Qt5\5.0.1\mingw47_32\lib -lQt5Core
    ./release\unzip.o:unzip.c:(.text+0x1008): undefined reference to crc32' ./release\unzip.o:unzip.c:(.text+0x10aa): undefined reference to inflate'
    ./release\unzip.o:unzip.c:(.text+0x10da): undefined reference to crc32' ./release\unzip.o:unzip.c:(.text+0x1110): undefined reference to crc32'
    ./release\unzip.o:unzip.c:(.text+0x1327): undefined reference to inflateEnd' ./release\unzip.o:unzip.c:(.text+0x1727): undefined reference to get_crc_table'
    ./release\unzip.o:unzip.c:(.text+0x186f): undefined reference to inflateInit2_' ./release\zip.o:zip.c:(.text+0xac7): undefined reference to crc32'
    ./release\zip.o:zip.c:(.text+0xb7c): undefined reference to deflate' ./release\zip.o:zip.c:(.text+0xcdf): undefined reference to deflate'
    ./release\zip.o:zip.c:(.text+0xef5): undefined reference to deflateEnd' ./release\zip.o:zip.c:(.text+0x13a8): undefined reference to get_crc_table'
    ./release\zip.o:zip.c:(.text+0x1af9): undefined reference to deflateInit2_' ./release\quaadler32.o:quaadler32.cpp:(.text+0x2e): undefined reference to adle
    r32'
    ./release\quaadler32.o:quaadler32.cpp:(.text+0x61): undefined reference to adle r32' ./release\quaadler32.o:quaadler32.cpp:(.text+0xa1): undefined reference to adle
    r32'
    ./release\quaadler32.o:quaadler32.cpp:(.text+0xb1): undefined reference to adle r32' c:/qt/qt5/tools/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64 -mingw32/bin/ld.exe: ./release\quaadler32.o: bad reloc address 0x0 in section .
    rdata$_ZTI13QuaChecksum32[__ZTI13QuaChecksum32]'
    collect2.exe: error: ld returned 1 exit status
    Makefile.Release:106: recipe for target 'release\quazip.dll' failed
    mingw32-make[1]: *** [release\quazip.dll] Error 1
    mingw32-make[1]: Leaving directory 'C:/Qt/quazip-0.5.1/quazip'
    makefile:34: recipe for target 'release' failed
    mingw32-make: *** [release] Error 2 @
    But in my Zlib-Folder (C:\Qt\Qt5\5.0.1\Src\qtbase\src\3rdparty\zlib) are all this listed files installed.

    As I tried to solve the problem, I have added into the quazip.pro and into the quazip.pri:
    @ INCLUDEPATH += $$[QT_INSTALL_PREFIX]/src/3rdparty/zlib @
    , how it is suggested at http://stackoverflow.com/questions/4449467/how-to-compile-and-use-quazip-on-windows-do-i-need-to-separately-install-zlib

    I can't find anything more, what could help me...

    I hope someone of you can help me.

    Greetings, LVreg

    1 Reply Last reply
    0
    • D Offline
      D Offline
      DanielS
      wrote on last edited by
      #2

      I had the same problem:

      this is "dirty solution", but it worked for me:

      extract quazip somewhere - for example here - C:\Qt\quazip-0.5.1\quazip
      download src zlib-1.2.5

      extract it somewhere

      C:\Qt\zlib-1.2.5

      copy all necessary files from zlib-1.2.5 except example.c, CMakeLists.txt...
      to C:\Qt\quazip-0.5.1\quazip

      and run qmake and mingw32-make...

      that's all

      1 Reply Last reply
      0
      • E Offline
        E Offline
        Erni35
        wrote on last edited by
        #3

        a late note to this thread.
        I had nearly the same problems with quazip 0.5.1 and Qt5.1 under win7.
        My solution is using the command line from Qt and replacing all
        #include "zlib.h"
        with
        #include <QtZlib/zlib.h>

        than I could compile quazip dlls separatly and inside my project.

        Erni35

        1 Reply Last reply
        0
        • L Offline
          L Offline
          Leon
          wrote on last edited by
          #4

          [quote author="DanielS" date="1366118904"]I had the same problem:

          this is "dirty solution", but it worked for me:

          extract quazip somewhere - for example here - C:\Qt\quazip-0.5.1\quazip
          download src zlib-1.2.5

          extract it somewhere

          C:\Qt\zlib-1.2.5

          copy all necessary files from zlib-1.2.5 except example.c, CMakeLists.txt...
          to C:\Qt\quazip-0.5.1\quazip

          and run qmake and mingw32-make...

          that's all[/quote]

          what are those necessary files from zlib-1.2.5?
          i can't build quazip on qt5, at windows 8
          kinda need help..

          1 Reply Last reply
          0
          • P Offline
            P Offline
            patrik08
            wrote on last edited by
            #5

            I not tink a depend from version of zlib..
            To only extract file from zip you can use the class from namenspace
            namespace KZip on file:
            https://github.com/pehohlva/wv2qt/blob/master/kzip.h
            https://github.com/pehohlva/wv2qt/blob/master/kzip.cpp

            @
            KZip::Stream *unzip = new KZip::Stream(docfilename);
            if (debugmodus) {
            unzip->explode_todir(this->get_cachedir(), 1);
            }
            /// or
            QMap<QString, QByteArray> all_file = unzip->listData();
            // to access on memory all file ...
            @

            I write this to access docx & odt document.

            1 Reply Last reply
            0
            • A Offline
              A Offline
              antonioborondo
              wrote on last edited by
              #6

              Hi LVreg,

              The problem is that QuaZIP can not find the zlib library. You should include the path of the headers an also the libraries when you run qmake:

              @
              qmake "INCLUDEPATH+=C:/Qt/Qt5/5.0.1/Src/qtbase/src/3rdparty/zlib" "LIBS+=-LC:/Qt/Qt5/5.0.1/Src/qtbase/src/3rdparty/zlib -lz"
              mingw32-make
              @

              There is a full explanation in my blog if you want to check it out: http://www.antonioborondo.com/2014/10/22/zipping-and-unzipping-files-with-qt/

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved