Results 1 to 2 of 2

Thread: error: cannot find -lGL

  1. #1
    Join Date
    Dec 2017
    Posts
    19
    Thanks
    10
    Qt products
    Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Android

    Default error: cannot find -lGL

    Hi everyone,
    I've installed Qt 5.11.1 on Ubuntu.
    I tried to run an empty widget, but following error occurred:
    error: cannot find -lGL

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: error: cannot find -lGL

    I tried to run an empty widget
    You don't run widgets, you run compiled and linked executable programs. The linker is complaining because you have asked it to link to an OpenGL library but you either 1) don't have an OpenGL development environment installed, 2) you have not specified the correct path the to OpenGL libraries in your Makefile / qmake .pro file or 3) the library is not named libGL on your system. And once you solve this problem, it will probably complain about the glu library as well since most OpenGL programs also use glu.

    Based on the questions you are posting here, I think you are in a bit over your head. Why don't you start by building some of the example programs that come with Qt and then once you get those to build and run correctly you can move on to programs of your own.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

  3. The following user says thank you to d_stranz for this useful post:

    CodeFreak (30th July 2018)

Similar Threads

  1. Qt error :-1: error: cannot find -lqxmpp
    By davinciomar in forum Newbie
    Replies: 10
    Last Post: 22nd August 2016, 22:22
  2. Error: /usr/bin/ld: cannot find -lGL
    By tomkonikkara in forum Newbie
    Replies: 18
    Last Post: 18th September 2015, 19:14
  3. Replies: 1
    Last Post: 28th December 2012, 22:13
  4. cannot find -lqwtd error
    By mobucl in forum Qwt
    Replies: 5
    Last Post: 6th May 2011, 12:59
  5. Find one error
    By BadKnees in forum Qt Programming
    Replies: 3
    Last Post: 24th March 2009, 15:33

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.