Qt5.14 error under ubuntu16.04: /home/zhangfakai/Qt5.14.1/5.14.1/gcc_64/include/QtGui/qopengl.h:141: error: GL/

Recently I was learning qt. Since the files developed by qt have good portability, I want to compile in the liunx environment, but the error keeps
reporting and my mentality collapses : /home/zhangfakai/Qt5.14.1/5.14.1/gcc_64/include/QtGui /qopengl.h:141:
error: GL/gl.h: No such file or directory

Insert picture description here

解决方法
打开终端,执行两条指令
sudo apt-get install mesa-common-dev
sudo apt-get install libgl1-mesa-dev libglu1-mesa-dev

Insert picture description here
Insert picture description here
Insert picture description here
Insert picture description here
Insert picture description here


> 再运行就成功了

Insert picture description here

Guess you like

Origin blog.csdn.net/qq_43475285/article/details/107741354