Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.7.0
-
None
-
Windows 7 64-bit Qt MinGW
Description
Code such as:
QOpenGLFunctions_1_0_CoreBackend(QOpenGLContext *c)
fails with a linking error:
release/QtGui-inlines.o:QtGui-inlines.cpp:(.text$_ZN32QOpenGLFunctions_1_0_CoreBackendC2EP14QOpenGLContext[__ZN32QOpenGLFunctions_1_0_CoreBackendC2EP14QOpenGLContext]+0x11): undefined reference to `QOpenGLFunctions_1_0_CoreBackend::init()'
My .pro file is:
QT += gui opengl CONFIG += c++11 TARGET = QtGui-inlines TEMPLATE = lib SOURCES += QtGui-inlines.cpp LIBS += -loleaut32 -lole32
My cpp file is:
#include <QtGui> extern "C" { void QtGui_inlines1402(void* instance, QOpenGLContext* c) { new (instance) QOpenGLFunctions_1_0_CoreBackend(c); } }
I was forced to patch the header by adding {} after init() in the body of QT_OPENGL_DECLARE(FUNCTIONS) (line 130 at present).