Hello. I need to draw a piecewise curve, so I decided to derive QwtPlotCurve and reimplement drawCurve method. I'm using VS2010. When I create new class inherited from QwtPlotCurve I get errors:
Error 4 error LNK1169: one or more multiply defined symbols found
Error 1 error LNK2005: "public: virtual void __thiscall QwtSeriesStore<class QPointF>::setRectOfInterest(class QRectF const &)" (?setRectOfInterest@?$QwtSeriesStore@VQPointF@@@@U AEXABVQRectF@@@Z) already defined in QwtPlotCurve2.obj
Error 2 error LNK2005: "public: virtual unsigned int __thiscall QwtSeriesStore<class QPointF>::dataSize(void)const " (?dataSize@?$QwtSeriesStore@VQPointF@@@@UBEIXZ) already defined in QwtPlotCurve2.obj
Error 3 error LNK2005: "public: virtual class QRectF __thiscall QwtSeriesStore<class QPointF>::dataRect(void)const " (?dataRect@?$QwtSeriesStore@VQPointF@@@@UBE?AVQRec tF@@XZ) already defined in QwtPlotCurve2.obj
New class contains only default constructor and destructor.
If I create inline class, stored in one header-file, I get no errors.
What the problem? Thanks.
Bookmarks