I try to build a Qt6 OpenGL application on an Ubuntu 22.04 Desktop system according to this:
But I get undefined errors:
In file included from /usr/include/x86_64-linux-gnu/qt6/QtGui/qopengl.h:146,
from /usr/include/x86_64-linux-gnu/qt6/QtOpenGLWidgets/qopenglwidget.h:47,
from /usr/include/x86_64-linux-gnu/qt6/QtOpenGLWidgets/QOpenGLWidget:1,
<ourinternalfiles>
/usr/include/x86_64-linux-gnu/qt6/QtGui/qopenglext.h:235:67: error: ‘GLdouble’ has not been declared
235 | typedef void (APIENTRYP PFNGLMULTITEXCOORD1DPROC) (GLenum target, GLdouble s);
Same for other typedefs like GLshort etc.
So far I tried adding libgl1-mesa-dev, libglu1-mesa-dev libegl1-mesa-dev libgles2-mesa-dev mesa-common-dev libxcb-glx0-dev, freeglut3-dev
It appears qopenglext.h prototypes some GL functions with GL types, but neither defines those types nor includes one of the header files that defines them.
If your system is similar, my bet is that libgl1-mesa-dev provides these header files.
So unless you see errors about not being able to include some header file in this compiler run, then the problem is some file should be including one of the above 2 GL header files first and isn’t.