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. Zlib library error | undefinied reference to
Qt 6.11 is out! See what's new in the release blog

Zlib library error | undefinied reference to

Scheduled Pinned Locked Moved Unsolved 3rd Party Software
2 Posts 2 Posters 1.5k 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.
  • BondrusiekB Offline
    BondrusiekB Offline
    Bondrusiek
    wrote on last edited by
    #1

    Hi all!

    I have a question about using Qt with zlib library.
    I create project. In *.pro I add

    include($$[QT_INSTALL_PREFIX]/Src/qtbase/src/3rdparty/zlib.pri)
    

    Next, I include zlib header #include <zlib.h>, when I compile everything is good but when I use function from zlib like gzopen Compilator gives error message:

    undefined reference to 'gzopen'
    

    How can I solve that problem ?

    Pablo J. RoginaP 1 Reply Last reply
    0
    • BondrusiekB Bondrusiek

      Hi all!

      I have a question about using Qt with zlib library.
      I create project. In *.pro I add

      include($$[QT_INSTALL_PREFIX]/Src/qtbase/src/3rdparty/zlib.pri)
      

      Next, I include zlib header #include <zlib.h>, when I compile everything is good but when I use function from zlib like gzopen Compilator gives error message:

      undefined reference to 'gzopen'
      

      How can I solve that problem ?

      Pablo J. RoginaP Offline
      Pablo J. RoginaP Offline
      Pablo J. Rogina
      wrote on last edited by
      #2

      @bondrusiek said in Zlib library error | undefinied reference to:

      when I use function from zlib like gzopen Compilator gives error message:
      undefined reference to 'gzopen'

      It's the linker complaining indeed...

      Are you sure you have the shared object for Qt zlib library available?

      How do you install Qt framework? Is it configured for -qt-zlib? See documentation regarding 3rd party libraries

      Upvote the answer(s) that helped you solve the issue
      Use "Topic Tools" button to mark your post as Solved
      Add screenshots via postimage.org
      Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      2

      • Login

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