原文链接:https://blog.csdn.net/songrotek/article/details/48023461
解决方法:缺少相应的opengl的库,需要安装opengl库
一、Ubuntu下解决Qt5.11.1 cannot find -lGL
有两种原因:
- 一种是没有按照libGL库,那么就安装:
sudo apt-get install libgl1-mesa-dev
- 一种是装了,但是libGL动态链接库的路径不对,那么就配置一下路径:
$ locate libGL
/usr/lib/i386-linux-gnu/mesa/libGL.so.1
/usr/lib/i386-linux-gnu/mesa/libGL.so.1.2.0
/usr/lib/x86_64-linux-gnu/libGLEW.so.1.10
/usr/lib/x86_64-linux-gnu/libGLEW.so.1.10.0
/usr/lib/x86_64-linux-gnu/libGLEWmx.so.1.10
/usr/lib/x86_64-linux-gnu/libGLEWmx.so.1.10.0
/usr/lib/x86_64-linux-gnu/libGLU.so.1
/usr/lib/x86_64-linux-gnu/libGLU.so.1.3.1
/usr/lib/x86_64-linux-gnu/mesa/libGL.so.1
/usr/lib/x86_64-linux-gnu/mesa/libGL.so.1.2.0
/usr/lib/x86_64-linux-gnu/mesa-egl/libGLESv2.so.2
/usr/lib/x86_64-linux-gnu/mesa-egl/libGLESv2.so.2.0.0
$ sudo ln -s /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1 /usr/lib/libGL.so
二、CentOS7遇到Qt编译问题的解决方案(error: cannot find -lGL)
-
- 安装opengl库,缺少相应的opengl的库,安装以下OpenGL相关库:
yum install mesa-libGL-devel mesa-libGLU-devel freeglut-devel
-
- 加入libGL库到/usr/lib目录下
使用locate libGL命令或find /usr -name libGL*命令搜索。
搜索结果中发现/usr/lib64/libGL.so.1文件(这个文件也可能在另一个目录中)。
代码语言:javascript复制[havealex@localhost ~]$ locate libGL
/home/havealex/QtProjects/QT5.9Samp/chap16Aux/samp16_3Setup/minGW/libGLESV2.dll
/home/havealex/QtProjects/QT5.9Samp/chap16Aux/samp16_3Setup/msvc32/libGLESV2.dll
/opt/Qt5.11.1/5.11.1/Src/qtbase/src/3rdparty/angle/src/libGLESv2
/opt/Qt5.11.1/5.11.1/Src/qtbase/src/3rdparty/angle/src/libGLESv2/entry_points_egl.cpp
/opt/Qt5.11.1/5.11.1/Src/qtbase/src/3rdparty/angle/src/libGLESv2/entry_points_egl.h
/opt/Qt5.11.1/5.11.1/Src/qtbase/src/3rdparty/angle/src/libGLESv2/entry_points_egl_ext.cpp
/opt/Qt5.11.1/5.11.1/Src/qtbase/src/3rdparty/angle/src/libGLESv2/entry_points_egl_ext.h
/opt/Qt5.11.1/5.11.1/Src/qtbase/src/3rdparty/angle/src/libGLESv2/entry_points_gles_2_0.cpp
/opt/Qt5.11.1/5.11.1/Src/qtbase/src/3rdparty/angle/src/libGLESv2/entry_points_gles_2_0.h
/opt/Qt5.11.1/5.11.1/Src/qtbase/src/3rdparty/angle/src/libGLESv2/entry_points_gles_2_0_ext.cpp
/opt/Qt5.11.1/5.11.1/Src/qtbase/src/3rdparty/angle/src/libGLESv2/entry_points_gles_2_0_ext.h
/opt/Qt5.11.1/5.11.1/Src/qtbase/src/3rdparty/angle/src/libGLESv2/entry_points_gles_3_0.cpp
/opt/Qt5.11.1/5.11.1/Src/qtbase/src/3rdparty/angle/src/libGLESv2/entry_points_gles_3_0.h
/opt/Qt5.11.1/5.11.1/Src/qtbase/src/3rdparty/angle/src/libGLESv2/entry_points_gles_3_0_ext.cpp
/opt/Qt5.11.1/5.11.1/Src/qtbase/src/3rdparty/angle/src/libGLESv2/entry_points_gles_3_0_ext.h
/opt/Qt5.11.1/5.11.1/Src/qtbase/src/3rdparty/angle/src/libGLESv2/global_state.cpp
/opt/Qt5.11.1/5.11.1/Src/qtbase/src/3rdparty/angle/src/libGLESv2/global_state.h
/opt/Qt5.11.1/5.11.1/Src/qtbase/src/3rdparty/angle/src/libGLESv2/libGLESv2.cpp
/opt/Qt5.11.1/5.11.1/Src/qtbase/src/3rdparty/angle/src/libGLESv2/libGLESv2.def
/opt/Qt5.11.1/5.11.1/Src/qtbase/src/3rdparty/angle/src/libGLESv2/libGLESv2_mingw32.def
/opt/Qt5.11.1/5.11.1/Src/qtbase/src/3rdparty/angle/src/libGLESv2/libGLESv2d.def
/opt/Qt5.11.1/5.11.1/Src/qtbase/src/3rdparty/angle/src/libGLESv2/libGLESv2d_mingw32.def
/opt/Qt5.11.1/5.11.1/Src/qtbase/src/3rdparty/angle/src/libGLESv2/resource.h
/opt/Qt5.11.1/5.11.1/Src/qtbase/src/angle/src/libGLESv2
/opt/Qt5.11.1/5.11.1/Src/qtbase/src/angle/src/libGLESv2/libGLESv2.pro
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/angle/src/libGLESv1_CM
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/angle/src/libGLESv2
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/angle/src/libGLESv2.gypi
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/angle/src/libGLESv1_CM/libGLESv1_CM.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/angle/src/libGLESv1_CM/libGLESv1_CM.def
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/angle/src/libGLESv1_CM/libGLESv1_CM.rc
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/angle/src/libGLESv1_CM/resource.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/angle/src/libGLESv2/entry_points_egl.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/angle/src/libGLESv2/entry_points_egl.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/angle/src/libGLESv2/entry_points_egl_ext.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/angle/src/libGLESv2/entry_points_egl_ext.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/angle/src/libGLESv2/entry_points_gles_1_0_autogen.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/angle/src/libGLESv2/entry_points_gles_1_0_autogen.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/angle/src/libGLESv2/entry_points_gles_2_0_autogen.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/angle/src/libGLESv2/entry_points_gles_2_0_autogen.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/angle/src/libGLESv2/entry_points_gles_2_0_ext.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/angle/src/libGLESv2/entry_points_gles_2_0_ext.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/angle/src/libGLESv2/entry_points_gles_3_0_autogen.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/angle/src/libGLESv2/entry_points_gles_3_0_autogen.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/angle/src/libGLESv2/entry_points_gles_3_1_autogen.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/angle/src/libGLESv2/entry_points_gles_3_1_autogen.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/angle/src/libGLESv2/entry_points_gles_ext_autogen.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/angle/src/libGLESv2/entry_points_gles_ext_autogen.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/angle/src/libGLESv2/gen_proc_table.py
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/angle/src/libGLESv2/global_state.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/angle/src/libGLESv2/global_state.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/angle/src/libGLESv2/libGLESv2.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/angle/src/libGLESv2/libGLESv2.def
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/angle/src/libGLESv2/libGLESv2.rc
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/angle/src/libGLESv2/proc_table.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/angle/src/libGLESv2/proc_table_autogen.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/angle/src/libGLESv2/proc_table_data.json
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/angle/src/libGLESv2/resource.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/mesa/src/docs/libGL.txt
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLES_CM
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/Buffer.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/Buffer.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/Context.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/Context.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/Device.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/Device.hpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/Display.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/Display.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/Fence.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/Fence.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/Framebuffer.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/Framebuffer.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/Image.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/Image.hpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/IndexDataManager.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/IndexDataManager.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/Program.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/Program.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/Query.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/Query.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/Renderbuffer.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/Renderbuffer.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/ResourceManager.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/ResourceManager.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/Shader.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/Shader.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/Surface.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/Surface.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/Texture.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/Texture.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/VertexDataManager.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/VertexDataManager.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/libGL.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/libGL.def
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/libGL.rc
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/libGL.vcxproj
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/libGL.vcxproj.filters
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/main.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/main.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/mathutil.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/resource.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/utilities.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGL/utilities.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLES_CM/Android.mk
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLES_CM/Buffer.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLES_CM/Buffer.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLES_CM/Context.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLES_CM/Context.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLES_CM/Device.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLES_CM/Device.hpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLES_CM/Framebuffer.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLES_CM/Framebuffer.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLES_CM/IndexDataManager.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLES_CM/IndexDataManager.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLES_CM/Renderbuffer.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLES_CM/Renderbuffer.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLES_CM/ResourceManager.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLES_CM/ResourceManager.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLES_CM/Texture.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLES_CM/Texture.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLES_CM/VertexDataManager.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLES_CM/VertexDataManager.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLES_CM/libGLES_CM.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLES_CM/libGLES_CM.def
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLES_CM/libGLES_CM.hpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLES_CM/libGLES_CM.lds
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLES_CM/libGLES_CM.rc
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLES_CM/libGLES_CM.vcxproj
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLES_CM/libGLES_CM.vcxproj.filters
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLES_CM/main.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLES_CM/main.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLES_CM/mathutil.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLES_CM/resource.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLES_CM/utilities.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLES_CM/utilities.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/Android.mk
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/BUILD.gn
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/Buffer.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/Buffer.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/Context.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/Context.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/Device.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/Device.hpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/Fence.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/Fence.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/Framebuffer.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/Framebuffer.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/IndexDataManager.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/IndexDataManager.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/Program.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/Program.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/Query.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/Query.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/Renderbuffer.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/Renderbuffer.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/ResourceManager.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/ResourceManager.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/Sampler.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/Shader.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/Shader.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/Texture.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/Texture.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/TransformFeedback.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/TransformFeedback.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/VertexArray.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/VertexArray.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/VertexDataManager.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/VertexDataManager.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/entry_points.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/libGLESv2.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/libGLESv2.def
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/libGLESv2.hpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/libGLESv2.lds
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/libGLESv2.rc
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/libGLESv2.vcxproj
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/libGLESv2.vcxproj.filters
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/libGLESv3.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/main.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/main.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/mathutil.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/resource.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/utilities.cpp
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/src/OpenGL/libGLESv2/utilities.h
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/third_party/PowerVR_SDK/Builds/Windows/x86_32/Lib/libGLES_CM.lib
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/third_party/PowerVR_SDK/Builds/Windows/x86_32/Lib/libGLESv2.lib
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/third_party/PowerVR_SDK/Builds/Windows/x86_64/Lib/libGLES_CM.lib
/opt/Qt5.11.1/5.11.1/Src/qtwebengine/src/3rdparty/chromium/third_party/swiftshader/third_party/PowerVR_SDK/Builds/Windows/x86_64/Lib/libGLESv2.lib
/opt/Qt5.11.1/Tools/QtCreator/lib/qtcreator/libGLSL.so
/opt/Qt5.11.1/Tools/QtCreator/lib/qtcreator/libGLSL.so.4
/opt/Qt5.11.1/Tools/QtCreator/lib/qtcreator/libGLSL.so.4.6
/opt/Qt5.11.1/Tools/QtCreator/lib/qtcreator/libGLSL.so.4.6.2
/opt/Qt5.11.1/Tools/QtCreator/lib/qtcreator/plugins/libGLSLEditor.so
/usr/lib/libGL.so
/usr/lib64/libGL.so
/usr/lib64/libGL.so.1
/usr/lib64/libGL.so.1.7.0
/usr/lib64/libGLESv1_CM.so
/usr/lib64/libGLESv1_CM.so.1
/usr/lib64/libGLESv1_CM.so.1.2.0
/usr/lib64/libGLESv2.so
/usr/lib64/libGLESv2.so.2
/usr/lib64/libGLESv2.so.2.1.0
/usr/lib64/libGLU.so
/usr/lib64/libGLU.so.1
/usr/lib64/libGLU.so.1.3.1
/usr/lib64/libGLX.so
/usr/lib64/libGLX.so.0
/usr/lib64/libGLX.so.0.0.0
/usr/lib64/libGLX_mesa.so.0
/usr/lib64/libGLX_mesa.so.0.0.0
/usr/lib64/libGLX_system.so.0
/usr/lib64/libGLdispatch.so
/usr/lib64/libGLdispatch.so.0
/usr/lib64/libGLdispatch.so.0.0.0
从上面的结果可以看到,libGL库被安装到/usr/lib64目录下,然后使用ln -s/usr/lib64/libGL.so.1 /usr/lib/libGL.so命令给已存在的库文件创建一个软链接到/usr/lib目录。
代码语言:javascript复制ln -s/usr/lib64/libGL.so.1 /usr/lib/libGL.so
再在QtCreator中运行QT项目,就不会报"Qt Creator出现cannot find -lGL"这个错误了。
参考链接
- Qt 之 运行Qt Creator出现cannot find -lGL的问题的两种解决
- CentOS遇到Qt编译问题的解决方案(error: cannot find -lGL)
- 【Qt】Centos7 qt出现cannot find -lGL