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. [Solved] build error QT 5.02 gui application
Qt 6.11 is out! See what's new in the release blog

[Solved] build error QT 5.02 gui application

Scheduled Pinned Locked Moved General and Desktop
14 Posts 4 Posters 12.1k 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.
  • E Offline
    E Offline
    esers
    wrote on last edited by
    #3

    I have libGL.so.1 in /usr/lib/x86_64-linux-gnu/mesa. It is symbolic link to libGL.so.1.2 in the same folder. There is also ld.so.conf in the same folder. But it seams that qt don't see them.
    I try to

    1. add INCLUDEPATH += /usr/lib/x86_64-linux-gnu/mesa
    2. add LIBS += -L/usr/lib/x86_64-linux-gnu/mesa/libGL.so.1
      to .pro file of my app. One item at a time.
      That does not fix the problem. I have the same error.

    How can I exclude directive -lGL from qmake command or add the path to /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1?

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

      Hi,

      The correct way to add a library path is:
      @LIBS += -L/usr/lib/x86_64-linux-gnu/mesa/@

      By the way, what system are you on ? That seems an unusual folder for mesa to installed

      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
      • E Offline
        E Offline
        esers
        wrote on last edited by
        #5

        Hi SGaist,
        your recomendation does not help.
        I have got the same error.

        1 Reply Last reply
        0
        • E Offline
          E Offline
          esers
          wrote on last edited by
          #6

          I have ubuntu 12.05 64-bit on Virtual box on Windows 7
          I have QT 5.02 and Boot to QT(evaluation) for QT5 installed.

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

            How did you instal mesa ?

            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
            • E Offline
              E Offline
              esers
              wrote on last edited by
              #8

              Hi SGaist,

              I install it during Boot to Qt intsaltion.
              http://dist.qt.digia.com/developer/download/BootToQt-installation-guide.html
              1.Installing 32-bit support libraries
              sudo apt-get install g++-multilib ia32-libs

              There were no dependent libraries for isa32-libs. So first install libraries from which isa32-lib is dependent. During this installation I install mesa I think.

              1 Reply Last reply
              0
              • E Offline
                E Offline
                esers
                wrote on last edited by
                #9

                Projects in Boot to Qt Creator are building without errors. But there are no examples in Boot to Qt. So I install Qt 5.02 to get the examples.

                1 Reply Last reply
                0
                • E Offline
                  E Offline
                  esers
                  wrote on last edited by
                  #10

                  I have solved the problem.

                  I delete "-lGL" in file
                  /home/sergey/Qt5.0.2/5.0.2/gcc_64/mkspecs/common
                  Before fix:
                  QMAKE_LIBS_OPENGL = -lGL
                  after fix:
                  QMAKE_LIBS_OPENGL =

                  In my example program I don' use opengl

                  1 Reply Last reply
                  0
                  • E Offline
                    E Offline
                    esers
                    wrote on last edited by
                    #11

                    The file name is:
                    /home/sergey/Qt5.0.2/5.0.2/gcc_64/mkspecs/common/linux.conf

                    1 Reply Last reply
                    0
                    • E Offline
                      E Offline
                      esers
                      wrote on last edited by
                      #12

                      The previous decision was only a patch.

                      The real fix is to install packages:
                      mesa-common-dev
                      libgl1-mesa-dev
                      libglu1-mesa-dev

                      for ubuntu 12.04

                      I was shure that I have installed those packages, but it was not so.

                      1 Reply Last reply
                      0
                      • E Offline
                        E Offline
                        esers
                        wrote on last edited by
                        #13

                        File /home/sergey/Qt5.0.2/5.0.2/gcc_64/mkspecs/common/linux.conf
                        must be restored to it's original state

                        1 Reply Last reply
                        0
                        • M Offline
                          M Offline
                          metoinside
                          wrote on last edited by
                          #14

                          It has been almost a year an your suggestion about installing:
                          @mesa-common-dev
                          libgl1-mesa-dev
                          libglu1-mesa-dev@
                          works!
                          After installation my issue of: "error: cannot find -lGL" resolved
                          Thanks esers!

                          1 Reply Last reply
                          1

                          • Login

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