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. zlib under Qt5
Forum Updated to NodeBB v4.3 + New Features

zlib under Qt5

Scheduled Pinned Locked Moved Solved General and Desktop
4 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.
  • G Offline
    G Offline
    gkavrecic
    wrote on last edited by
    #1

    I have a program originally developed under Qt4 which used zlib.

    I have in the *.PRO file a line stating LIBS += libz.a which links the zLib

    While compiling the same project under Qt5 I get
    ***.cpp:-1: error: undefined reference to 'inflate'

    I compile it in Windows with MingW.
    I can compile the same project in Linux and ARM in Qt5.

    How comes?
    How to resolve? - (I can't use qCompress/qUncompress as I'm reading ZIP compressed files)

    JonBJ 1 Reply Last reply
    0
    • G gkavrecic

      I have a program originally developed under Qt4 which used zlib.

      I have in the *.PRO file a line stating LIBS += libz.a which links the zLib

      While compiling the same project under Qt5 I get
      ***.cpp:-1: error: undefined reference to 'inflate'

      I compile it in Windows with MingW.
      I can compile the same project in Linux and ARM in Qt5.

      How comes?
      How to resolve? - (I can't use qCompress/qUncompress as I'm reading ZIP compressed files)

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

      @gkavrecic

      While compiling the same project under Qt5 I get
      ***.cpp:-1: error: undefined reference to 'inflate'

      Can you confirm you get this error while compiling, not linking? If it's while compiling it would be a header file issue, not a library.

      G 1 Reply Last reply
      1
      • G Offline
        G Offline
        gkavrecic
        wrote on last edited by
        #3

        Sometimes just asking a question makes you really think...

        In order to use zlib I had to add LIBS += -lz

        Hopes it help others

        1 Reply Last reply
        1
        • JonBJ JonB

          @gkavrecic

          While compiling the same project under Qt5 I get
          ***.cpp:-1: error: undefined reference to 'inflate'

          Can you confirm you get this error while compiling, not linking? If it's while compiling it would be a header file issue, not a library.

          G Offline
          G Offline
          gkavrecic
          wrote on last edited by
          #4

          @JonB, you're right.
          This error normally pops up during linking.
          Sorry for the typo.

          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