简介
ubuntu14 Qt5.6 编译qt quick代码时提示 “cannot find -lGL” ,原因是缺少OpenGL链接库
解决方法
sudo apt-get install libgl1-mesa-dev
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
将会安装下列额外的软件包:
libdrm-amdgpu1 libdrm-dev libx11-xcb-dev libxcb-dri2-0-dev libxcb-dri3-dev
libxcb-glx0-dev libxcb-present-dev libxcb-randr0-dev libxcb-render0-dev
libxcb-shape0-dev libxcb-sync-dev libxcb-xfixes0-dev libxdamage-dev
libxshmfence-dev libxxf86vm-dev mesa-common-dev x11proto-damage-dev
x11proto-dri2-dev x11proto-gl-dev x11proto-xf86vidmode-dev
下列【新】软件包将被安装:
libdrm-amdgpu1 libdrm-dev libgl1-mesa-dev libx11-xcb-dev libxcb-dri2-0-dev
libxcb-dri3-dev libxcb-glx0-dev libxcb-present-dev libxcb-randr0-dev
libxcb-render0-dev libxcb-shape0-dev libxcb-sync-dev libxcb-xfixes0-dev
libxdamage-dev libxshmfence-dev libxxf86vm-dev mesa-common-dev
x11proto-damage-dev x11proto-dri2-dev x11proto-gl-dev
x11proto-xf86vidmode-dev
参考
http://stackoverflow.com/questions/18406369/qt-cant-find-lgl-error