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] compile error: "/usr/bin/ld: cannot find -lGL" after Fresh install of Qt 5.3 on new system
QtWS25 Last Chance

[SOLVED] compile error: "/usr/bin/ld: cannot find -lGL" after Fresh install of Qt 5.3 on new system

Scheduled Pinned Locked Moved General and Desktop
5 Posts 2 Posters 2.7k 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.
  • M Offline
    M Offline
    MartinCook
    wrote on last edited by
    #1

    Operating Environment
    Qt 5.3.1
    Qt Creator 3.1.2
    RHEL 7.0

    Getting the following compile error output.

    3:46:34: Running steps for project bits...
    13:46:34: Configuration unchanged, skipping qmake step.
    13:46:34: Starting: "/usr/bin/make"
    g++ -Wl,-rpath,/home/tcamuso/Qt/5.3/gcc_64 -Wl,-rpath,/home/tcamuso/Qt/5.3/gcc_64/lib -o bits main.o hexedit.o bits.o bitfield.o BitButton.o shiftop.o formatgroup.o moc_bits.o moc_BitButton.o moc_hexedit.o moc_shiftop.o moc_formatgroup.o -L/home/tcamuso/Qt/5.3/gcc_64/lib -lQt5Widgets -lQt5Gui -lQt5Core -lGL -lpthread
    /usr/bin/ld: cannot find -lGL
    collect2: error: ld returned 1 exit status
    make: *** [bits] Error 1
    13:46:34: The process "/usr/bin/make" exited with code 2.
    Error while building/deploying project bits (kit: Desktop Qt 5.3 GCC 64bit)
    When executing step 'Make'
    13:46:34: Elapsed time: 00:00.

    Obviously I'm missing the libGL file. I tried ...
    $ cp /usr/lib64/libGL.so.1 /home/tcamuso/Qt/5.3/gcc_64/lib/.
    ... but no joy.

    I've installed Qt on other systems/OS before (W32, W64, Fedora, Ubuntu) and never encountered this problem.

    Any ideas?

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

      Hi,

      This question has been asked many times, please search the forum first. You are missing the OpenGL development package.

      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
      • M Offline
        M Offline
        MartinCook
        wrote on last edited by
        #3

        Yes. that was it. THANKS!

        For anyone else on RHEL7/CentOS7 ...
        @

        yum install ghc-OpenGL-devel.x86_64

        @
        ... did it for me.

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

          You're welcome !

          Since you have OpenGL working now, please update the thread title prepending [solved] so other forum users may know a solution has been found :)

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

            Done, and thanks again!

            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