Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. error : undefined reference to `qt_resourceFeatureZlib'
QtWS25 Last Chance

error : undefined reference to `qt_resourceFeatureZlib'

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
27 Posts 3 Posters 5.3k Views
  • 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.
  • S Offline
    S Offline
    sberkantgulen
    wrote on 28 Jul 2021, 05:48 last edited by
    #1

    Hello,

    When i install qt automatically with commands below. It works.
    Qt version is 5.9 when i install Qt with this commands.

    sudo apt install build-essential
    sudo apt install qtcreator
    sudo apt install qt5-default
    

    But i'm installing another Qt version which is 5.14.2 and then I'm trying to compile & run my Qt Gui App and i see following error.

    *undefined reference to `qt_resourceFeatureZlib'*
    

    All other setups are the same. for both installation!

    error.png

    error2.png

    J 1 Reply Last reply 28 Jul 2021, 05:53
    0
    • S sberkantgulen
      28 Jul 2021, 05:48

      Hello,

      When i install qt automatically with commands below. It works.
      Qt version is 5.9 when i install Qt with this commands.

      sudo apt install build-essential
      sudo apt install qtcreator
      sudo apt install qt5-default
      

      But i'm installing another Qt version which is 5.14.2 and then I'm trying to compile & run my Qt Gui App and i see following error.

      *undefined reference to `qt_resourceFeatureZlib'*
      

      All other setups are the same. for both installation!

      error.png

      error2.png

      J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 28 Jul 2021, 05:53 last edited by
      #2

      @sberkantgulen said in error : undefined reference to `qt_resourceFeatureZlib':

      i'm installing another Qt version

      How exactly?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      S 1 Reply Last reply 28 Jul 2021, 05:59
      0
      • J jsulm
        28 Jul 2021, 05:53

        @sberkantgulen said in error : undefined reference to `qt_resourceFeatureZlib':

        i'm installing another Qt version

        How exactly?

        S Offline
        S Offline
        sberkantgulen
        wrote on 28 Jul 2021, 05:59 last edited by
        #3

        @jsulm Thanks for answer.

        I downloaded qt offline installer then i installed it on ubuntu 18.04.

        qt-opensource-linux-x64-5.14.2.run
        https://download.qt.io/archive/qt/5.14/5.14.2/

        By the way, Qt examples work correctly.

        J 1 Reply Last reply 28 Jul 2021, 06:02
        0
        • S sberkantgulen
          28 Jul 2021, 05:59

          @jsulm Thanks for answer.

          I downloaded qt offline installer then i installed it on ubuntu 18.04.

          qt-opensource-linux-x64-5.14.2.run
          https://download.qt.io/archive/qt/5.14/5.14.2/

          By the way, Qt examples work correctly.

          J Offline
          J Offline
          jsulm
          Lifetime Qt Champion
          wrote on 28 Jul 2021, 06:02 last edited by
          #4

          @sberkantgulen Can you post the whole compile output?
          Do you have any pre-build binaries?

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • S Offline
            S Offline
            sberkantgulen
            wrote on 28 Jul 2021, 06:09 last edited by
            #5

            @jsulm said in error : undefined reference to `qt_resourceFeatureZlib':

            build

            error3.png

            Is there any difference between PKG_CONFIG ?

            export PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig/
            source ~/.bashrc
            echo $PKG_CONFIG_PATH

            J 1 Reply Last reply 28 Jul 2021, 06:13
            0
            • S sberkantgulen
              28 Jul 2021, 06:09

              @jsulm said in error : undefined reference to `qt_resourceFeatureZlib':

              build

              error3.png

              Is there any difference between PKG_CONFIG ?

              export PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig/
              source ~/.bashrc
              echo $PKG_CONFIG_PATH

              J Offline
              J Offline
              jsulm
              Lifetime Qt Champion
              wrote on 28 Jul 2021, 06:13 last edited by
              #6

              @sberkantgulen This is not the whole compile output. Please do a complete rebuild and post the compile output (delete build folder, run qmake and build).

              There shouldn't be any need to set PKG_CONFIG_PATH.

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • S Offline
                S Offline
                sberkantgulen
                wrote on 28 Jul 2021, 06:20 last edited by
                #7

                It is so long, you can download from link below.

                https://s5.dosya.tc/server4/f78313/qt_build.odt.html

                J 1 Reply Last reply 28 Jul 2021, 06:21
                0
                • S sberkantgulen
                  28 Jul 2021, 06:20

                  It is so long, you can download from link below.

                  https://s5.dosya.tc/server4/f78313/qt_build.odt.html

                  J Offline
                  J Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote on 28 Jul 2021, 06:21 last edited by
                  #8

                  @sberkantgulen Please upload a simple text file, not Open Office one (I will not open office files)...

                  https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  0
                  • S Offline
                    S Offline
                    sberkantgulen
                    wrote on 28 Jul 2021, 06:30 last edited by
                    #9

                    Uh, sorry..

                    https://s5.dosya.tc/server4/smn9tn/err.txt.html

                    J 1 Reply Last reply 28 Jul 2021, 06:38
                    0
                    • S sberkantgulen
                      28 Jul 2021, 06:30

                      Uh, sorry..

                      https://s5.dosya.tc/server4/smn9tn/err.txt.html

                      J Offline
                      J Offline
                      jsulm
                      Lifetime Qt Champion
                      wrote on 28 Jul 2021, 06:38 last edited by
                      #10

                      @sberkantgulen Linker cannot find your libs:

                      /usr/bin/ld: cannot find -lBL
                      /usr/bin/ld: cannot find -lDL
                      

                      You should check how you handle the dependencies between your subfolders.
                      g++ -Wl,-rpath,/home/kkvyz1/Qt5.14.2/5.14.2/gcc_64/lib -o PL main.o qrc_qml.o -L/usr/lib/x86_64-linux-gnu/ -L/home/kkvyz1/Desktop/dQGCS/dev/build-YKI-Desktop_Qt_5_14_2_GCC_64bit-Debug/PL/../BL/ -lBL -L/home/kkvyz1/Desktop/dQGCS/dev/build-YKI-Desktop_Qt_5_14_2_GCC_64bit-Debug/PL/../DL/ -lDL -lcairo -lQt5GStreamerQuick-1.0 -lQt5Quick -lQt5Gui -lQt5Qml -lQt5Network -lgstvideo-1.0 -lgstbase-1.0 -lgstreamer-1.0 -lgobject-2.0 -lglib-2.0 -lQt5GStreamer-1.0 -lQt5GLib-2.0 -lQt5Core /home/kkvyz1/Qt5.14.2/5.14.2/gcc_64/lib/libQt5Quick.so /home/kkvyz1/Qt5.14.2/5.14.2/gcc_64/lib/libQt5Gui.so /home/kkvyz1/Qt5.14.2/5.14.2/gcc_64/lib/libQt5QmlModels.so /home/kkvyz1/Qt5.14.2/5.14.2/gcc_64/lib/libQt5Qml.so /home/kkvyz1/Qt5.14.2/5.14.2/gcc_64/lib/libQt5Network.so /home/kkvyz1/Qt5.14.2/5.14.2/gcc_64/lib/libQt5Core.so -lGL -lpthread

                      https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply
                      1
                      • S Offline
                        S Offline
                        sberkantgulen
                        wrote on 28 Jul 2021, 06:49 last edited by
                        #11

                        @jsulm said in error : undefined reference to `qt_resourceFeatureZlib':

                        how you handle the dependencies between your subfolders.

                        My project's pro file like this:

                        TEMPLATE = subdirs
                        
                        SUBDIRS += \
                            DL \
                            BL \
                            PL
                        

                        And other .pro files like this:

                        error4.png

                        How exactly should I make a change?
                        Also this project works when I auto-install with 5.9.

                        J 1 Reply Last reply 28 Jul 2021, 06:55
                        0
                        • S sberkantgulen
                          28 Jul 2021, 06:49

                          @jsulm said in error : undefined reference to `qt_resourceFeatureZlib':

                          how you handle the dependencies between your subfolders.

                          My project's pro file like this:

                          TEMPLATE = subdirs
                          
                          SUBDIRS += \
                              DL \
                              BL \
                              PL
                          

                          And other .pro files like this:

                          error4.png

                          How exactly should I make a change?
                          Also this project works when I auto-install with 5.9.

                          J Offline
                          J Offline
                          jsulm
                          Lifetime Qt Champion
                          wrote on 28 Jul 2021, 06:55 last edited by
                          #12

                          @sberkantgulen Take a look at https://doc.qt.io/qt-5/qmake-variable-reference.html#subdirs, especially the *.depends part. You need to specify the dependencies between your subdirs.

                          https://forum.qt.io/topic/113070/qt-code-of-conduct

                          1 Reply Last reply
                          0
                          • S Offline
                            S Offline
                            sberkantgulen
                            wrote on 28 Jul 2021, 07:16 last edited by
                            #13

                            Thank you, I will do some more research on these issues.

                            But i still can not understand. Everything works when i use cmd.
                            If there is a problem about dependencies how project works on Qt 5.9 ?

                            What is the difference between offline installation and command line installation ?
                            I can not understand. Qt 5.12 and Qt 5.14 give me error..

                            J 1 Reply Last reply 28 Jul 2021, 07:29
                            0
                            • S sberkantgulen
                              28 Jul 2021, 07:16

                              Thank you, I will do some more research on these issues.

                              But i still can not understand. Everything works when i use cmd.
                              If there is a problem about dependencies how project works on Qt 5.9 ?

                              What is the difference between offline installation and command line installation ?
                              I can not understand. Qt 5.12 and Qt 5.14 give me error..

                              J Offline
                              J Offline
                              jsulm
                              Lifetime Qt Champion
                              wrote on 28 Jul 2021, 07:29 last edited by
                              #14

                              @sberkantgulen I don't know why it works with Qt 5.9, maybe that version handles build folders with subdirs projects differently than newer version and you were simply lucky.

                              "What is the difference between offline installation and command line installation ?" - I guess by "command line installation" you mean installing using apt? Using apt you install Qt built and packaged by your Linux distribution. If you use offline/online installer you use official Qt builds from Qt Company.

                              https://forum.qt.io/topic/113070/qt-code-of-conduct

                              1 Reply Last reply
                              0
                              • S Offline
                                S Offline
                                sberkantgulen
                                wrote on 28 Jul 2021, 07:44 last edited by sberkantgulen
                                #15

                                Yes, i mean when i install from terminal with command:

                                sudo apt-get install qt5-default   
                                

                                It installs Qt 5.9.5.
                                And everything is okey. For example i can run qtcreator from terminal with:

                                sudo ./qtcreator
                                

                                But, when i install qt with offline installer i can't do same things.
                                Terminal can not find qtcreator when i run:

                                sudo ./qtcreator
                                

                                I thought there might be a problem with the paths. But no matter what I did, I couldn't solve it.

                                J 1 Reply Last reply 28 Jul 2021, 07:56
                                0
                                • S sberkantgulen
                                  28 Jul 2021, 07:44

                                  Yes, i mean when i install from terminal with command:

                                  sudo apt-get install qt5-default   
                                  

                                  It installs Qt 5.9.5.
                                  And everything is okey. For example i can run qtcreator from terminal with:

                                  sudo ./qtcreator
                                  

                                  But, when i install qt with offline installer i can't do same things.
                                  Terminal can not find qtcreator when i run:

                                  sudo ./qtcreator
                                  

                                  I thought there might be a problem with the paths. But no matter what I did, I couldn't solve it.

                                  J Offline
                                  J Offline
                                  jsulm
                                  Lifetime Qt Champion
                                  wrote on 28 Jul 2021, 07:56 last edited by
                                  #16

                                  @sberkantgulen said in error : undefined reference to `qt_resourceFeatureZlib':

                                  sudo ./qtcreator

                                  Why do you start QtCreator with sudo?! This is not needed at all!

                                  To start QtCreator installed using offline/online installer you simply have to use absolute path. On my machine it is:

                                  ~/Qt/Tools/QtCreator/bin/qtcreator
                                  

                                  https://forum.qt.io/topic/113070/qt-code-of-conduct

                                  1 Reply Last reply
                                  0
                                  • S Offline
                                    S Offline
                                    sberkantgulen
                                    wrote on 28 Jul 2021, 08:14 last edited by
                                    #17

                                    Yes, i mean;

                                    Maybe problem can be about file association . I wanted to point this out .
                                    It's like it can't see the libraries and therefore cannot mount sub-directories.
                                    AM i wrong?

                                    J 1 Reply Last reply 28 Jul 2021, 08:19
                                    0
                                    • S sberkantgulen
                                      28 Jul 2021, 08:14

                                      Yes, i mean;

                                      Maybe problem can be about file association . I wanted to point this out .
                                      It's like it can't see the libraries and therefore cannot mount sub-directories.
                                      AM i wrong?

                                      J Offline
                                      J Offline
                                      jsulm
                                      Lifetime Qt Champion
                                      wrote on 28 Jul 2021, 08:19 last edited by
                                      #18

                                      @sberkantgulen Not sure what you mean. QtCreator has nothing to do with building of your app (you can build in a terminal without QtCreator). Also, nothing is mounted. The problem is that linker can't find the libraries. That means those libraries are not located in the folders you pass to the linker (like here: -L/home/kkvyz1/Desktop/dQGCS/dev/build-YKI-Desktop_Qt_5_14_2_GCC_64bit-Debug/PL/../DL). So, I suggest you really take a look at the link I gave you and define the dependencies between your subfolders properly.

                                      https://forum.qt.io/topic/113070/qt-code-of-conduct

                                      1 Reply Last reply
                                      0
                                      • S Offline
                                        S Offline
                                        sberkantgulen
                                        wrote on 28 Jul 2021, 10:24 last edited by sberkantgulen
                                        #19

                                        I mean, my problem can be like this topic:
                                        https://forum.qt.io/topic/107933/undefined-reference-to-qt_resourcefeaturezlib

                                        And i don't know how can i change libraries.

                                        J 1 Reply Last reply 28 Jul 2021, 10:30
                                        0
                                        • S sberkantgulen
                                          28 Jul 2021, 10:24

                                          I mean, my problem can be like this topic:
                                          https://forum.qt.io/topic/107933/undefined-reference-to-qt_resourcefeaturezlib

                                          And i don't know how can i change libraries.

                                          J Offline
                                          J Offline
                                          jsulm
                                          Lifetime Qt Champion
                                          wrote on 28 Jul 2021, 10:30 last edited by
                                          #20

                                          @sberkantgulen The problem from your last compile log has nothing to do with resourcefeaturezlib...

                                          https://forum.qt.io/topic/113070/qt-code-of-conduct

                                          1 Reply Last reply
                                          1

                                          3/27

                                          28 Jul 2021, 05:59

                                          24 unread
                                          • Login

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