Error: cannot find -lGL



  • Hello all,
    I am trying to build a project in Qt Creator 2.7.
    And while the build it is giving this error:
    :-1: error: cannot find -lGL

    i dont know to what library it corresponds.
    Please help.
    Thanks
    Best regards
    Avinash Singh



  • You need to install libgl (OpenGL API development files), check the documentation on how you do that in your system, for example in Ubuntu (most likely Debian and other derivatives have the exact package name) you do it like this:
    @sudo apt-get install libgl1-mesa-dev@



  • okey. Thank you so much. it worked. i tried to get the names for the correct library for opengl but wasnt able to find that.
    Environment is Ubuntu.
    This worked.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.