I have been playing around with QwtPlots, seeing what I can do with them. I want to extend QwtPlotCanvas, which itself inherits from QFrame. When I build my application, I get a linker error:
1>moc_myplotcanvas.obj : error LNK2001: unresolved external symbol "public: static struct QMetaObject const QwtPlotCanvas::staticMetaObject" (?staticMetaObject@QwtPlotCanvas@@2UQMetaObject@@B )
If I add the moc_qwt_plot_canvas.cpp file built earlier into my project, it compiles and links just fine.
I suspect I am missing something obvious here.
Is there a built-in limitation here? Am I just not going to be able to extend a class that itself inherits from QObject, unless I include the moc file into my project?
Using Qt 4.6.0 and qwt 5.2.0.


Reply With Quote

But let's pretend that I DID want to. Am I just out of luck (can't be linked), or am I missing something?

Bookmarks