Important: Please read the Qt Code of Conduct -

Qt 5.5.0 problem running examples [SOLVED]

  • After install QT 5.5.0 on Ubuntu 14.04 LTS (launching the downloaded file ""), first thing I tried to compile one of the enclosed examples. I began with "analogclock", but the following error appeared:
    "GL/gl.h: No such file or directory".
    Any suggestions?

  • Hi....
    you read it?

    Install OpenGL libraries

    Execute the following command to install OpenGL libraries:

    sudo apt-get install mesa-common-dev

    Note: Just installing the above-mentioned mesa-common-dev kit is not sufficient for more recent Ubuntu versions. Based on this comment in the forum an additional package needs installation. Execute following command:

    sudo apt-get install libglu1-mesa-dev -y

    Tested with Qt5.3.1 and Ubuntu 14.04 and it solved the problem with missing -lGL.

  • Partially solved! So, Thanks!
    "analogclock" examples needs "rasterwindow.h" header, but it seems missing in QT 5.5.0 (or path is different for some Header that have to be included?).
    Same problem for other examples, as serial port: it requires headers that during Building phase aren't find.
    Any suggestion?

  • Lifetime Qt Champion


    That class is in the rasterwindow folder in the examples folder, how are you building your example ?

  • @SGaist
    You're right!
    I copied "analogclock" folder only to my test folder and it was no possible to compile it; after have been copied the whole "gui" folder (containing more examples, including analogclock), all works perfectly.
    I tried serialport example also: no problem occurs.
    Thanks SGaist

  • My error after cannot find GL.h is cannot find -lGL
    I need to create link in my PC
    sudo ln -s /usr/lib/ /usr/lib/

  • Lifetime Qt Champion

    @Hieu-Le said in Qt 5.5.0 problem running examples [SOLVED]:

    My error after cannot find GL.h is cannot find -lGL
    I need to create link in my PC
    sudo ln -s /usr/lib/ /usr/lib/

    Hi and welcome to devnet,

    No you don't. The correct thing to do is to install the OpenGL development package for your distribution.

Log in to reply