Important: Please read the Qt Code of Conduct -

Qt Creator on Linux - GL Library

  • I installed Qt Creator onto Linux Mint 18.1 using the website download.

    Creating a standard desktop widget app gives a compile failure which basically boils down to the GL library not being found (-lGL flag). I managed to work around it by opening the Makefile and removing -lGL .

    My questions are :-

    1. What is the GL library ? (I'm guessing graphics library)
    2. Why wasn't it installed if it's included in the build config by default?
    3. How can I install it?

    Thanks in advance

  • Lifetime Qt Champion


    1. The OpenGL libraries
    2. Because it's a system level dependency and in your case each Linux distribution provides it from possibly different sources depending partly on your graphic stack. Other OSs might provide them natively (e.g. macOS).
    3. Use your distribution package manager

    PS: this question has already been asked numerous times, please take the time to use the forum search.

  • Hi,
    He needed Help and you just said RTFM... not fair... I have the same question as I installed QT 5.9 too on 18.1... the GL library is likely to be unavailable on 18.1 by default and the package seems hard to find... Help needed

  • search "mesa-dev" packages and select OpenGL implementation and install the stuff it worked for me

Log in to reply