After installing QT 5.9 Creator on Ubuntu Linux I cannot compile and run examples that use QT Widgets. Here is the g++ call that is executed by QT Creator:
g++ -Wl,-rpath,/home/matthias/Qt/5.9.1/gcc_64/lib -o gallery main.o qrc_gallery.o -L/home/matthias/Qt/5.9.1/gcc_64/lib -lQt5Quick -lQt5Widgets -lQt5Gui -lQt5Qml -lQt5Network -lQt5Core -lGL -lpthread
The error is:
/usr/bin/ld: cannot find -lGL Makefile:245: recipe for target 'gallery' failed collect2: error: ld returned 1 exit status make: *** [gallery] Error 1 20:16:53: The process "/usr/bin/make" exited with code 2. Error while building/deploying project gallery (kit: Desktop Qt 5.9.1 GCC 64bit) When executing step "Make"
Obviously the parameter -lGL is causing the error. How do I fix that ?