QOpenGLPaintDevice is undefined for Qt 5.9 on MSVC 2015
-
I am trying to enable OpenGL-based painting in QCustomPlot. My class derives from QCustomPlot and then adds the data to draw line graphs. This works fine when creating a DLL after:
- Defining the
QCUSTOMPLOT_USE_OPENGL
pre-processor symbol. - Un-defining
QT_NO_OPENGL
pre-processor symbol. - Adding opengl32.lib to the linker line.
However, the headers of the above project are included in another project (same solution) and the DLL is added to the project reference, but compiler says
error C2065: 'QOpenGLPaintDevice': undeclared identifier
when compiling the second project.From what I can understand is that the class is not available if
QT_NO_OPENGL
is defined. My question is where is the definition being included from? Even after adding#undef QT_NO_OPENGL
to all the projects, I still have the error in the second project. - Defining the
-
Hi,
Are you trying to build your project with a version of Qt that has been build with OpenGL disabled ?
-
I solved the issue, cleaning everything up and rebuilding the solution did it. I now have a new problem with OpenGL enabled. Shall post a new question. Thank you!