Qt 6: cannot find -lOpenGL
-
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 -lOpenGLSo, I tried to install again this package:
sudo apt-get install build-essential libgl1-mesa-devAnd use
locateto 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.0But 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
-
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 -lOpenGLSo, I tried to install again this package:
sudo apt-get install build-essential libgl1-mesa-devAnd use
locateto 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.0But 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
@fem_dev For my case this solution work's perfectly. Thanks !
-
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 -lOpenGLSo, I tried to install again this package:
sudo apt-get install build-essential libgl1-mesa-devAnd use
locateto 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.0But 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
@fem_dev Thanks, in my case It works too
-
error build : cannot find -lgl
++++++++++++++++++
sudo apt-get install mesa-common-dev libgl1-mesa-dev libglu1-mesa-dev
Thank you all!