Page 1 of 1

Problem installing wxFreeChart

Posted: Fri Dec 27, 2019 2:17 pm
by MagicznaFlet
Hi, I have downloaded the wxFreeChart from https://github.com/iwbnwif/wxFreeChart but whenever I run \build\wxFreeChart_vc9.sln and try to run it throws 'void wxBaseArray<T *,wxSortedArray_SortFunction<Dataset**>>::Remove(Dataset**)': cannot convert argument 1 from 'Dataset *' to 'T'
and syntax error: missing ';' before 'if'. Simply adding the \include\wx to project properties it throws unresolved external symbol every time I try to use one of it`s functions. Is it the right way of installing it?

Re: Problem installing wxFreeChart

Posted: Fri Dec 27, 2019 2:52 pm
by doublemax
This almost sounds like you're using an older compiler without proper template support. Which one do you use?

Re: Problem installing wxFreeChart

Posted: Fri Dec 27, 2019 3:11 pm
by MagicznaFlet
I`m using visual studio 19. if that`s the case is it possible to downgrade to an older version for free? Or maybe there are other tools to create a chart in wxWidgets?

Re: Problem installing wxFreeChart

Posted: Fri Dec 27, 2019 4:28 pm
by doublemax
I'm getting the same error when using VS2013, so i don't think it's a compiler issue. But i don't have time to take a closer look at the moment.

Re: Problem installing wxFreeChart

Posted: Fri Dec 27, 2019 5:00 pm
by stahta01
If you post the line number/file of the errors I could see if there is know fixes!

These repos has fixes that might match up with your errors.

https://github.com/nineisk/wxFreeChart/commits/master
https://github.com/exacqvision-client/w ... its/master

Tim S.

Re: Problem installing wxFreeChart

Posted: Fri Dec 27, 2019 6:15 pm
by doublemax
I can confirm that the version from https://github.com/nineisk/wxFreeChart/ builds out of the box with VS2013.

Re: Problem installing wxFreeChart

Posted: Sat Dec 28, 2019 1:59 pm
by MagicznaFlet
both versions build succeeds but afterwards a window pops out saying "Unable to start program (...)\build\..\lib\vc_lib\wxFreeChart.lib the system cannot find the file specified". After adding E:\sdks\wxFrCh\include to project properties->C/C++->Additional Include Directories and E:\sdks\wxFrCh\lib\vc_lib
to project properties->Linker->Additional Library Directories my program still throws out Unresolved External Symbol anytime i try to use any wxFreeChart functions. Have I done everything correctly?

Re: Problem installing wxFreeChart

Posted: Sat Dec 28, 2019 2:19 pm
by doublemax
The main freechart project just creates a library, not an executable. Go into the "sample" directory and build the project there. Make sure that you use the same configuration as you used when building the library.

Re: Problem installing wxFreeChart

Posted: Sat Dec 28, 2019 2:36 pm
by MagicznaFlet
I`m not sure if I understand you correctly but afrer pasting the FreeChart files to where i installed wxWidgers and running wxFreeChart_vc9.sln the same missing file error appears

Re: Problem installing wxFreeChart

Posted: Sat Dec 28, 2019 2:40 pm
by Kvaz1r
MagicznaFlet wrote: Sat Dec 28, 2019 1:59 pm both versions build succeeds but afterwards a window pops out saying "Unable to start program (...)\build\..\lib\vc_lib\wxFreeChart.lib the system cannot find the file specified". After adding E:\sdks\wxFrCh\include to project properties->C/C++->Additional Include Directories and E:\sdks\wxFrCh\lib\vc_lib
to project properties->Linker->Additional Library Directories my program still throws out Unresolved External Symbol anytime i try to use any wxFreeChart functions. Have I done everything correctly?
That's because you "build and run" project and not just build. You should add wxFreeChart to your project like you add any other libraries. Start with sample if all was done right it should work.

Re: Problem installing wxFreeChart

Posted: Sat Dec 28, 2019 3:02 pm
by MagicznaFlet
The sample project runs perfectly but inside my project i get unresolved external symbols. Not if I added it correctly it`s the first library other that wxWidgets I`m adding

Re: Problem installing wxFreeChart

Posted: Sat Dec 28, 2019 3:05 pm
by doublemax
Do you link freechart statically or as DLL?

What are the exact error messages and when/where do they appear (compile time, link time or run time)?

Re: Problem installing wxFreeChart

Posted: Sat Dec 28, 2019 5:50 pm
by MagicznaFlet
doublemax wrote: Sat Dec 28, 2019 3:05 pm Do you link freechart statically or as DLL?

What are the exact error messages and when/where do they appear (compile time, link time or run time)?
Sadly I don`t understand the first question
Don`t know how to check what time they appear but the message is
Error LNK2019 unresolved external symbol "public: __thiscall CategoryAxis::CategoryAxis(enum AXIS_LOCATION)" (??0CategoryAxis@@QAE@W4AXIS_LOCATION@@@Z) referenced in function "private: class Chart * __thiscall cChartFrame::createChart(void)" (?createChart@cChartFrame@@AAEPAVChart@@XZ) WDID_GUI E:\Programowanie\C++\WDID_GUI\WDID_GUI\cChartFrame.obj

Re: Problem installing wxFreeChart

Posted: Sat Dec 28, 2019 7:13 pm
by Kvaz1r
Maybe you forgot to add wxFreeChart.lib file in additional dependencies of linker settings?

Re: Problem installing wxFreeChart

Posted: Fri Jan 03, 2020 1:19 pm
by MagicznaFlet
Kvaz1r wrote: Sat Dec 28, 2019 7:13 pm Maybe you forgot to add wxFreeChart.lib file in additional dependencies of linker settings?
Yes! Thanks everyone for your help really appreciate it