Problem with wxPlotdata (wxPlotCtrl) MSVS2008 wxPack

Talk here about issues with one of the components hosted at wxCode, or suggest features for it.
Post Reply
sprite99
In need of some credit
In need of some credit
Posts: 8
Joined: Thu Nov 12, 2009 12:46 pm

Problem with wxPlotdata (wxPlotCtrl) MSVS2008 wxPack

Post by sprite99 »

Hello,
i am using wxPack and i want to use wxPlotCtrl in my project. I have created window with one button and wxPlotCtrl object, which i can compile without any problems but when I try to use wxPlotCtr to drow data ( wxPlotData* pdata = new wxPlotData(20); ) there are errors:
Error 1 error LNK2005: "public: virtual class wxClassInfo * __thiscall wxPlotCurve::GetClassInfo(void)const " (?GetClassInfo@wxPlotCurve@@UBEPAVwxClassInfo@@XZ) already defined in wxmsw28ud_plot.lib(plotlib_plot.obj) wxmsw28ud_plotctrl.lib

Error 2 error LNK2005: "public: static class wxClassInfo wxPlotCurve::ms_classInfo" (?ms_classInfo@wxPlotCurve@@2VwxClassInfo@@A) already defined in wxmsw28ud_plot.lib(plotlib_plot.obj) wxmsw28ud_plotctrl.lib

Error 3 fatal error LNK1169: one or more multiply defined symbols found c:\Documents and Settings\Damian\Pulpit\testy\aa\aa\Debug\aa.exe 1
I am using wxVC from wxpack to create new project and wxFormBuilder so properties in VS are set automatically.

can anybody help me and write solution with details (beginner in wxWidgets and VS)?
sprite99
In need of some credit
In need of some credit
Posts: 8
Joined: Thu Nov 12, 2009 12:46 pm

Post by sprite99 »

Solved:

In file: link_additions.h do:

#pragma comment( lib, GET_WX_LIB_NAME( flatnotebook ) )
//#pragma comment( lib, GET_WX_LIB_NAME( plot ) )
#pragma comment( lib, GET_WX_LIB_NAME( plotctrl ) )
Post Reply