Undefined symbol: _ZTI13QOpenGLWidget when loading my shared lib
I am on ubuntu 14.04, Qt5.4
I am trying to create a shared library with a class derived from QOpenGLWidget.
The compilation finish with success. But when I load this library (libviewer3d.so) with QLibrary I get an error.
@libviewer3d.so: undefined symbol: _ZTI13QOpenGLWidget@
@TARGET = viewer3d
TEMPLATE = lib
QT += core gui widgets qml
CONFIG += c++11 release shared
LIBS += -lGLU -lGL
SOURCES += src/Viewer.cpp
HEADERS += src/Viewer.hpp
INCLUDEPATH += src
Moreover when I use the Viewer class in an application, like in the example, it works.
Is-there a flag that I must append in the .pro?
Thanks for your help.
Try to add in your .pro:
QT += opengl
Thanks for the reply.
I tried this too but it did not work. ( new QOpenGLWidget does not depend on opengl module )
I made some tests with new opengl widgets:
QOpenGLWidget and QOpenGLWindow give me the described error.
When I made my own opengl window with QWindow and QOpenGLFunctions, it works.
When I used the old QGLWidget is works too.
Well I decide to run with QGLWidget again... :-) i going to wait for an improvement of the new classes.