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. cannot find -lGL at compil time
Forum Updated to NodeBB v4.3 + New Features

cannot find -lGL at compil time

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
4 Posts 3 Posters 519 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.
  • M Offline
    M Offline
    maxime62
    wrote on last edited by
    #1

    Hi,
    It's my first installation of Qt

    OS: centos 7 64 bits
    GCC: 4.8.5
    I also installed CLANG: 3.4.2
    I installed QT 5.9.1 and 5.12.2 (same problem with the two)
    OpenGL: 3.0

    The problem: At compil time (it's a test project with just an empty window), i have this error:

    /usr/bin/ld: cannot find -lGL
    collect2: error: ld returned 1 exit status
    make: *** [testmk_6] Error 1
    14:08:31: process "/usr/bin/make" stopped with code 2.
    Error during compilation/déploy of project testmk_6 (kit : Desktop Qt 5.12.2 GCC 64bit2)
    When executing step "Make"

    After research, it seems that lGL library concerns OpenGL, but OpenGL is well installed on my Centos.
    My error is not referenced on internet, so i'm stuck.
    Thanks for information.

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      You need to install development packages for OpenGL (and other Qt dependencies, too). I think for CentOS these would be:

      sudo yum install mesa-libGLU-devel
      

      Not sure though, I'm not a regular CentOS user (thankfully ;-) It's dinosaur-age state gets on my nerves quickly).

      (Z(:^

      1 Reply Last reply
      2
      • M Offline
        M Offline
        maxime62
        wrote on last edited by
        #3

        Yes Sierdzio you're right.
        It's 'mesa-libGLU-devel'

        So in my case (centos): sudo yum install mesa-libGLU-devel

        And now my Qt compile works fine.

        Thanks.

        aha_1980A 1 Reply Last reply
        1
        • M maxime62

          Yes Sierdzio you're right.
          It's 'mesa-libGLU-devel'

          So in my case (centos): sudo yum install mesa-libGLU-devel

          And now my Qt compile works fine.

          Thanks.

          aha_1980A Offline
          aha_1980A Offline
          aha_1980
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @maxime62 glad you got it working. So please mark this topic as SOLVED now. Thanks

          Qt has to stay free or it will die.

          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