Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. [Solved] On Qt 5.2.1 with QT Creator, I get an error of cannot find -lGL when I compile.
Forum Updated to NodeBB v4.3 + New Features

[Solved] On Qt 5.2.1 with QT Creator, I get an error of cannot find -lGL when I compile.

Scheduled Pinned Locked Moved Qt Creator and other tools
3 Posts 2 Posters 1.5k 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.
  • T Offline
    T Offline
    tom.abcd
    wrote on last edited by
    #1

    I have installed Qt 5.2.1 by downloading and using the Qt online installer for Linux 32 bit on a Xubuntu 32 bit virtual machine. Qt Creator runs but when I tried to compile the app it gives some errors. First it gave the error of no compiler and I installed g++ to fix that error.

    Now it gives "cannot find -lGL" so this appears to be a linking error so I am guessing I am missing some other support files.

    So my questions:

    1. Why did the online installer not detect if everything was installed and install it or give me a list of things to install?
      (IE should this have worked and did I just miss checking some option? If so let me know and I can try installing again.)

    2. Since the installer did not do it ... where is the list of what is needed to use Qt?
      I have seen this page http://qt-project.org/doc/qt-5/linux-requirements.html
      and it gives a list of packages if you are building from source. So do I need all of these packages to use Qtcreator?

    3. Since I am just using a virtual machine, I can easily try a different distro instead. So is there a distro that works correctly with the Qt installer so I can just run it and have everything installed?

    Thanks
    Tom

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

      Hi,

      This one is a classic, you need to install the opengl library developement package.

      1. The installer can't detect that since there are numerous distributions that have their own package management.

      2. "Here":http://qt-project.org/wiki/Building_Qt_5_from_Git you have a good list of what you might need depending on which module you will use.

      3. Technically all can work provided they are recent enough. The missing dev packages depends generally on what you develop before so it's a one time setup you'll need to do.

      Hope it helps

      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
      • T Offline
        T Offline
        tom.abcd
        wrote on last edited by
        #3

        Looking at the link you provided, it was not clear to me what exactly I needed to install.
        So I installed libcogl-dev and libcogl-gles2-dev and now it works.

        Thanks very much.
        Tom

        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