[Qt-interest] unresolved Symbol (QMetaObject const QwtPlot::staticMetaObject) in qwtplot derived Class
Ian Thomson
Ian.Thomson at iongeo.com
Thu Dec 11 13:55:03 CET 2008
Hi,
Could you post a small piece of code which demonstrates the problem?
Cheers,
Ian.
Matthias Pospiech wrote:
> Arnold Krille schrieb:
>> 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...
>>
>>
> "moc_QScatterPlot.cpp" IS part of the project and is compiled and linked.
>
> I have not done anything different from all the other 50 Qt classes in
> the project but only get the error with this file.
>
> 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