Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 1

Qt-interest Archive, April 2007
LNK2001: unresolved external symbol "public: static struct QMetaObject const QwtPlot::staticMetaObject"


Message 1 in thread

I have moc on the .h file, and add the generated moc_PlotCurve.cpp to my 
project, but

moc_PlotCurve.obj : error LNK2001: unresolved external symbol "public: 
static struct QMetaObject const QwtPlot::staticMetaObject" 
(?staticMetaObject@QwtPlot@@2UQMetaObject@@B)

What is "staticMetaObject"? Any idea?

Thanks,
Lingfa



--
 [ signature omitted ] 

Message 2 in thread

Lingfa Yang wrote:
> I have moc on the .h file, and add the generated moc_PlotCurve.cpp to my 
> project, but
> 
> moc_PlotCurve.obj : error LNK2001: unresolved external symbol "public: 
> static struct QMetaObject const QwtPlot::staticMetaObject" 
> (?staticMetaObject@QwtPlot@@2UQMetaObject@@B)

Could it be that you forgot to include the Q_OBJECT macro in this 
QwtPlot class?

> 
> What is "staticMetaObject"? Any idea?

See QObject::metaObject() in the documentation.

Martin.

--
 [ signature omitted ]