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]"cannot find -lGL" error
Forum Updated to NodeBB v4.3 + New Features

[Solved]"cannot find -lGL" error

Scheduled Pinned Locked Moved General and Desktop
7 Posts 3 Posters 2.6k 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.
  • P Offline
    P Offline
    Psycho_Coder
    wrote on last edited by
    #1

    Hello All,

    This is my first first here. I am basically a Java and python programmer. I know C++ but today I decided to learn to use Qt to make GUI in C++.

    I have installed QtCreator and QT Libraries using online installer on fedora 16.

    I want to make a simple GUI at first. I dragged a button and a label on the form and on click the button it would show Hello world on the label.

    But when I build the project it shows an error "cannot find -lGL"

    @17:27:16: Running steps for project HelloWorld...
    17:27:16: Configuration unchanged, skipping qmake step.
    17:27:16: Starting: "/usr/bin/make"
    g++ -Wl,-rpath,/opt/Qt/5.1.0/gcc_64 -Wl,-rpath,/opt/Qt/5.1.0/gcc_64/lib -o HelloWorld main.o mainwindow.o moc_mainwindow.o -L/opt/Qt//5.1.0/gcc_64/lib -lQt5Widgets -lQt5Gui -lQt5Core -lGL -lpthread
    /usr/bin/ld: cannot find -lGL
    collect2: ld returned 1 exit status
    make: *** [HelloWorld] Error 1
    17:27:16: The process "/usr/bin/make" exited with code 2.
    Error while building/deploying project HelloWorld (kit: Desktop Qt 5.1.0 GCC 64bit)
    When executing step 'Make'
    17:27:16: Elapsed time: 00:00.@

    The above is the compiler output I get. Please help and guide me how to solve it.

    Thank you,
    Sincerely,
    Psycho_Coder

    "Don't do anything by half. If you love someone, love them with all your soul. When you hate someone, hate them until it hurts."
    -------- Henry Rol...

    1 Reply Last reply
    0
    • S Offline
      S Offline
      Skyrpex
      wrote on last edited by
      #2

      Looks like you need to install the development libraries of OpenGL.

      I've never used Fedora. Maybe sudo apt-get install libgl-dev will do the trick.

      1 Reply Last reply
      0
      • P Offline
        P Offline
        Psycho_Coder
        wrote on last edited by
        #3

        [quote author="Skyrpex" date="1377605874"]Looks like you need to install the development libraries of OpenGL.

        I've never used Fedora. Maybe sudo apt-get install libgl-dev will do the trick.[/quote]
        Well I used Ubuntu earlier. But now I use fedora, actually its been 4 days since I booted fedora.
        I am at present downloading some OpenGL libraries but I don't know if they will work.

        Do you know any particular package for fedora I mean equivalent package.

        "Don't do anything by half. If you love someone, love them with all your soul. When you hate someone, hate them until it hurts."
        -------- Henry Rol...

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

          Hi,
          IIRC something like

          @yum install mesa-libGL-devel@

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

            [quote author="SGaist" date="1377616658"]Hi,
            IIRC something like

            @yum install mesa-libGL-devel@[/quote]

            Thanks a lot I did that and now its working fine.

            [quote author="Skyrpex" date="1377605874"]Looks like you need to install the development libraries of OpenGL.

            I've never used Fedora. Maybe sudo apt-get install libgl-dev will do the trick.[/quote]

            Thank you for your reply as this worked fine.

            "Don't do anything by half. If you love someone, love them with all your soul. When you hate someone, hate them until it hurts."
            -------- Henry Rol...

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

              You're welcome !

              Don't forget to update the thread's title prepending solved so other forum users will 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
              • P Offline
                P Offline
                Psycho_Coder
                wrote on last edited by
                #7

                [quote author="SGaist" date="1377620428"]You're welcome !

                Don't forget to update the thread's title prepending solved so other forum users will know a solution has been found :)[/quote]

                I have did it. Thanks. Actually I am not new to forum system. I have to many forums and I am active in some forums. But those are mybb and SimpleMachines or phpBB forums and whenever a thread is solved a moderator marks it as solved. So I thought that there must be some kind of system like that.

                However from now I will do as you said.

                "Don't do anything by half. If you love someone, love them with all your soul. When you hate someone, hate them until it hurts."
                -------- Henry Rol...

                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