今天在安装Qt官网文档中的qtbase实例包的的时候
qt/qtbase.git - Qt Base (Core, Gui, Widgets, Network, ...)
按照正常步骤先git clone https://code.qt.io/qt/qtbase.git --branch 5.15 到本地
然后按顺序使用 qmake make 和 make install (我的编译器用的是64位mingw 对应的make指令是mingw32-make)来安装
在运行qmake的时候弹出warning: The build will most likely fail.
之后再make的时候果然中间断掉了,提示error:EGL/egl.h: No such file or directory
我在网上查到了linux系统的解决方法,就是安装opengl就行,用以下指令:apt-get install libegl1-mesa-dev
windows的解决方法其实warning里面已经提示了,就是用-opengl desktop 切换到desktop版本的opengl就好
之前的opengl版本是这个Dynamic Opengl
使用configure -opengl desktop 命令 重新qmake一遍
就切换到了Desktop OpenGL,这次qmake就没有任何warning了。然后make 和make install也都跑通,没有error,成功安装qtbase。