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. How to solve Issue- "cannot find -lGL" in Qt5 installed in ubuntu
Forum Updated to NodeBB v4.3 + New Features

How to solve Issue- "cannot find -lGL" in Qt5 installed in ubuntu

Scheduled Pinned Locked Moved General and Desktop
9 Posts 4 Posters 9.4k 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.
  • U Offline
    U Offline
    unmesh
    wrote on 19 Apr 2013, 13:52 last edited by
    #1

    I run my project from one system. It run verry well. It is simple addition with GUI. (GUI consist of 3 LineEdit and one pushButton).
    After compling from one system. then i try to run project on another system then it gives following error (issues)

    :-1: error: cannot find -lGL
    :-1: error: collect2: ld returned 1 exit status

    How to solve this problem?? Help me..........
    thank you.........

    1 Reply Last reply
    0
    • Z Offline
      Z Offline
      ZapB
      wrote on 19 Apr 2013, 14:21 last edited by
      #2

      Install the OpenGL development libraries for your system. Probably something along the lines of mesa-devel or gl-devel.

      Nokia Certified Qt Specialist
      Interested in hearing about Qt related work

      1 Reply Last reply
      0
      • G Offline
        G Offline
        goblincoding
        wrote on 20 Apr 2013, 12:11 last edited by
        #3

        For future reference, installing libglu1-mesa-dev worked for me (Ubuntu 12.04)

        http://www.goblincoding.com

        1 Reply Last reply
        0
        • R Offline
          R Offline
          rsjethani
          wrote on 11 Aug 2013, 07:05 last edited by
          #4

          I have the same problem but libGL.so is already on my system but instead of "/usr/lib" it is in "/usr/lib/i386-linux-gnu/mesa/libGL.so". I think I just need to tell qtcreator the actual path. Can you tell me hoe to do that?

          Ravi S. Jethani

          1 Reply Last reply
          0
          • Z Offline
            Z Offline
            ZapB
            wrote on 11 Aug 2013, 09:20 last edited by
            #5

            That sounds like the 32-bit support libs rather than the native 64-bit one. Are you running a 64-bit OS? If so you need to find the relevant package that includes libGL.so.

            Nokia Certified Qt Specialist
            Interested in hearing about Qt related work

            1 Reply Last reply
            0
            • R Offline
              R Offline
              rsjethani
              wrote on 11 Aug 2013, 11:28 last edited by
              #6

              My OS is Linux Mint 15 32 bit and it is running as a guest using virtual box on windows 7 64 bit

              Ravi S. Jethani

              1 Reply Last reply
              0
              • Z Offline
                Z Offline
                ZapB
                wrote on 11 Aug 2013, 11:53 last edited by
                #7

                OK then, in that case you need to ensure that the runtime linker, ldd, can find libraries in that directory.

                Nokia Certified Qt Specialist
                Interested in hearing about Qt related work

                1 Reply Last reply
                0
                • R Offline
                  R Offline
                  rsjethani
                  wrote on 11 Aug 2013, 13:23 last edited by
                  #8

                  yes exactly but how can I do that using qmake can u tell me?

                  Ravi S. Jethani

                  1 Reply Last reply
                  0
                  • Z Offline
                    Z Offline
                    ZapB
                    wrote on 11 Aug 2013, 13:59 last edited by
                    #9

                    It's probably best to fix this at the system level instead. One way would be to symlink libGL.so.1 within /usr/lib. This may go against your distro's recommended approach for switching between OpenGL implementations, I don't know though.

                    Nokia Certified Qt Specialist
                    Interested in hearing about Qt related work

                    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