[Qt-interest] unresolved Symbol (QMetaObject const QwtPlot::staticMetaObject) in qwtplot derived Class
Arnold Krille
arnold at arnoldarts.de
Thu Dec 11 13:43:07 CET 2008
On Thursday 11 December 2008 12:59:11 Matthias Pospiech wrote:
> Matthias Pospiech schrieb:
> > I have the following class which is derived from QwtPlot (which is
> > derived from QFrame)
> > It includes Q_OBJECT, a moc file is created and part of the project,
> > but I get this linker error:
> > 1>moc_QScatterPlot.obj : error LNK2001: Nicht aufgelöstes externes
> > Symbol ""public: static struct QMetaObject const
> > QwtPlot::staticMetaObject"
> > (?staticMetaObject at QwtPlot@@2UQMetaObject@@B)".
> > Why, and how do I resolve it?
> It is resolved by removing Q_OBJECT
> class QScatterPlot : public QwtPlot
> {
> //Q_OBJECT
Or by including the generated moc-file in your build. Either as a separate
source or by including <file>.moc in your <file>.cpp...
Have fun,
Arnold
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20081211/ade5eb7d/attachment.bin
More information about the Qt-interest-old
mailing list