[Qt-interest] unresolved Symbol (QMetaObject const QwtPlot::staticMetaObject) in qwtplot derived Class
Ian Thomson
Ian.Thomson at iongeo.com
Thu Dec 11 14:27:35 CET 2008
If both files have Q_OBJECT macro, and are being moc'ed and the
moc_*.cpp is being compiled, then it should all work fine.
Searching through the qt-interest archives, it seems like there are a
few related problems with qwt, often with visual studio 2005.
If you have not searched this list and the qwt mailing list archives
then I recommend it. Some previous solution may work for you. Otherwise
I would try asking on the qwt list as well, as it seems to be a problem
specific to that library.
Cheers,
Ian.
Matthias Pospiech wrote:
> Ian Thomson schrieb:
>> Hi,
>>
>> It seems as if you have a QObject derived class called Zoomer inside
>> your .cpp file. This class doesn't have the Q_OBJECT macro.
>>
>> Is this the case? If so, is moc being run on this class's definition
>> inside the .cpp file?
>>
>>
> Indeed not moc is generated for the Zoomer class. But this class is not
> using signals or slots itsself.
> Out of interest I have placed it in the .h file. This now gives me
> errors for both classes:
>
> 1>moc_QScatterPlot.obj : error LNK2001: Nicht aufgelöstes externes
> Symbol ""public: static struct QMetaObject const
> QwtPlot::staticMetaObject" (?staticMetaObject at QwtPlot@@2UQMetaObject@@B)".
> 1>moc_QScatterPlot.obj : error LNK2001: Nicht aufgelöstes externes
> Symbol ""public: static struct QMetaObject const
> QwtPlotZoomer::staticMetaObject"
> (?staticMetaObject at QwtPlotZoomer@@2UQMetaObject@@B)".
>
> So no problem is solved by adding a Q_OBJECT in the Zoomer class.
>
> Matthias
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
This email and any files transmitted with it are confidential and are intended solely for the use of the individual or entity to whom they are addressed. If you are not the original recipient or the person responsible for delivering the email to the intended recipient, be advised that you have received this email in error, and that any use, dissemination, forwarding, printing, or copying of this email is strictly prohibited. If you received this email in error, please immediately notify the sender and delete the original.
More information about the Qt-interest-old
mailing list