[Development] Unsatisfied symbols for QAbstractOpenGLFunctions
Christophe de Dinechin
christophe at taodyne.com
Wed Nov 26 10:10:15 CET 2014
On 26 Nov 2014, at 09:46, Sean Harmer <sean.harmer at kdab.com> wrote:
>
> On Wednesday 26 Nov 2014 09:13:38 Christophe de Dinechin wrote:
>>> On 26 Nov 2014, at 09:04, Konstantin Ritt <ritt.ks at gmail.com> wrote:
>>>
>>> class QAbstractOpenGLFunctions
>>> (note missing Q_GUI_EXPORT)
>>
>> Do you mean this is a bug, or that I'm using it wrong and it's not supposed
>> to be visible in the library? If not, why is its destructor virtual
>> (implying that the symbol for dtor and vtable at least should be exported).
>
> How are you trying to use this class? It's not meant to be used directly but
> rather one of it's concrete subclasses.
I'm not using it directly. I have something that looks like this:
#include <QtGlobal>
#if QT_VERSION < 0x050100
struct TaoOpenGLFunctions {};
// additional stuff to get glew.h
#else
# include <QOpenGLFunctions_3_0>
struct TaoOpenGLFunctions : QOpenGLFunctions_3_0 {};
#endif
struct OpenGLState : GraphicState, TaoOpenGLFunctions { ... }
It compiles OK, but it fails to link stating that it does not find the vtable for QAbstractOpenGLFunctions, referenced from the compiler-generated copy constructor for QAbstractOpenGLFunctions. Maybe the problem is that there should be a copy constructor in the class? Even if marked private, if the intent is that you can't copy the class (but I don't see why not).
> We've been using the concrete
> subclasses in a number of projects and have not had any problem.
Try with a class that has a copy constructor or with a usage pattern that causes the compiler to generate a copy constructor.
Thanks
Christophe
More information about the Development
mailing list