Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Trying to build "quazip" library. But have only unresolved external symbols.
Qt 6.11 is out! See what's new in the release blog

Trying to build "quazip" library. But have only unresolved external symbols.

Scheduled Pinned Locked Moved General and Desktop
5 Posts 2 Posters 4.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.
  • N Offline
    N Offline
    nikitablack
    wrote on last edited by
    #1

    Greetings,

    I need to compress/uncompress files and want to use "quazip library":http://quazip.sourceforge.net/. But I can't build it. I removed all unimportant stuff and here's my *.pro file:

    @TEMPLATE = lib
    CONFIG += qt warn_on
    QT -= gui

    The ABI version.

    !win32:VERSION = 1.0.0

    This one handles dllimport/dllexport directives.

    DEFINES += QUAZIP_BUILD

    You'll need to define this one manually if using a build system other

    than qmake or using QuaZIP sources directly in your project.

    CONFIG(staticlib): DEFINES += QUAZIP_STATIC

    Input

    INCLUDEPATH += $$PWD
    DEPENDPATH += $$PWD
    HEADERS +=
    $$PWD/crypt.h
    $$PWD/ioapi.h
    $$PWD/JlCompress.h
    $$PWD/quaadler32.h
    $$PWD/quachecksum32.h
    $$PWD/quacrc32.h
    $$PWD/quagzipfile.h
    $$PWD/quaziodevice.h
    $$PWD/quazipdir.h
    $$PWD/quazipfile.h
    $$PWD/quazipfileinfo.h
    $$PWD/quazip_global.h
    $$PWD/quazip.h
    $$PWD/quazipnewinfo.h
    $$PWD/unzip.h
    $$PWD/zip.h

    SOURCES += $$PWD/qioapi.cpp
    $$PWD/JlCompress.cpp
    $$PWD/quaadler32.cpp
    $$PWD/quacrc32.cpp
    $$PWD/quagzipfile.cpp
    $$PWD/quaziodevice.cpp
    $$PWD/quazip.cpp
    $$PWD/quazipdir.cpp
    $$PWD/quazipfile.cpp
    $$PWD/quazipfileinfo.cpp
    $$PWD/quazipnewinfo.cpp
    $$PWD/unzip.c
    $$PWD/zip.c

    headers.path=$$PREFIX/include/quazip
    headers.files=$$HEADERS
    target.path=$$PREFIX/lib
    INSTALLS += headers target

    workaround for qdatetime.h macro bug

    DEFINES += NOMINMAX

    LIBS += -L$$PWD/../../../zliblibs/ -lzdll

    INCLUDEPATH += $$PWD/../../../zliblibs
    DEPENDPATH += $$PWD/../../../zliblibs@

    .../zliblibs/ path contain headers, .lib and .dll. But building a project fails due to a bunch of unresolved external symbols. The paths are correct, I added them with "Add Library..." option. Also .lib have this symbols - I tried an example with visual studio and it works. I'm using Qt Creator 3.3, Win7.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      What are the missing symbols ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • N Offline
        N Offline
        nikitablack
        wrote on last edited by
        #3

        SGaist,

        adler32, crc32, gzdopen, gzread, gzwrite etc... Everything from zdll.lib.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          What version of Qt are you currently using ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • N Offline
            N Offline
            nikitablack
            wrote on last edited by
            #5

            SGaist,
            Qt 5.4.0.

            After a lot of searches and tries I found that adding
            @INCLUDEPATH += $$[QT_INSTALL_HEADERS]/QtZlib@

            solves my problem. Now I wonder - why?

            I found that zlib headers are part of Qt. Also Qt5Core.dll have zlib symbols so there's no need to add zlib library to quazip. But, Qt's zlib version is 1.2.5 while the latest official version is 1.2.8.

            When I try to include latest headers and latest lib I have this error and I can't understand why.

            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