Qt 6: cannot find -lOpenGL
Solved
General and Desktop
-
I have a Qt C++ application that compiles Ok with Qt 5.15.0, but, when I switch to Qt 6.0.0 I got this compile time error:
cannot find -lOpenGL
So, I tried to install again this package:
sudo apt-get install build-essential libgl1-mesa-dev
And use
locate
to show the installed files:locate libOpenGL /snap/gnome-3-34-1804/36/usr/lib/x86_64-linux-gnu/libOpenGL.so /snap/gnome-3-34-1804/36/usr/lib/x86_64-linux-gnu/libOpenGL.so.0 /snap/gnome-3-34-1804/36/usr/lib/x86_64-linux-gnu/libOpenGL.so.0.0.0 /snap/gnome-3-34-1804/60/usr/lib/x86_64-linux-gnu/libOpenGL.so /snap/gnome-3-34-1804/60/usr/lib/x86_64-linux-gnu/libOpenGL.so.0 /snap/gnome-3-34-1804/60/usr/lib/x86_64-linux-gnu/libOpenGL.so.0.0.0 /snap/kde-frameworks-5-core18/32/usr/lib/x86_64-linux-gnu/libOpenGL.so /snap/kde-frameworks-5-core18/32/usr/lib/x86_64-linux-gnu/libOpenGL.so.0 /snap/kde-frameworks-5-core18/32/usr/lib/x86_64-linux-gnu/libOpenGL.so.0.0.0
But I got the same error again....
What is wrong with Qt 6 setup?
My system:
- Ubuntu 20.04 x64
- Qt Creator IDE 4.14.0