Problem installing wxFreeChart

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Post Reply
MagicznaFlet
Earned a small fee
Earned a small fee
Posts: 12
Joined: Tue Nov 19, 2019 11:17 am

Problem installing wxFreeChart

Post 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?
User avatar
doublemax
Moderator
Moderator
Posts: 19116
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Problem installing wxFreeChart

Post by doublemax »

This almost sounds like you're using an older compiler without proper template support. Which one do you use?
Use the source, Luke!
MagicznaFlet
Earned a small fee
Earned a small fee
Posts: 12
Joined: Tue Nov 19, 2019 11:17 am

Re: Problem installing wxFreeChart

Post 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?
User avatar
doublemax
Moderator
Moderator
Posts: 19116
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Problem installing wxFreeChart

Post 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.
Use the source, Luke!
stahta01
Ultimate wxWidgets Guru
Ultimate wxWidgets Guru
Posts: 548
Joined: Fri Nov 03, 2006 2:00 pm

Re: Problem installing wxFreeChart

Post 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.
User avatar
doublemax
Moderator
Moderator
Posts: 19116
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Problem installing wxFreeChart

Post by doublemax »

I can confirm that the version from https://github.com/nineisk/wxFreeChart/ builds out of the box with VS2013.
Use the source, Luke!
MagicznaFlet
Earned a small fee
Earned a small fee
Posts: 12
Joined: Tue Nov 19, 2019 11:17 am

Re: Problem installing wxFreeChart

Post 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?
User avatar
doublemax
Moderator
Moderator
Posts: 19116
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Problem installing wxFreeChart

Post 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.
Use the source, Luke!
MagicznaFlet
Earned a small fee
Earned a small fee
Posts: 12
Joined: Tue Nov 19, 2019 11:17 am

Re: Problem installing wxFreeChart

Post 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
Kvaz1r
Super wx Problem Solver
Super wx Problem Solver
Posts: 357
Joined: Tue Jun 07, 2016 1:07 pm

Re: Problem installing wxFreeChart

Post 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.
MagicznaFlet
Earned a small fee
Earned a small fee
Posts: 12
Joined: Tue Nov 19, 2019 11:17 am

Re: Problem installing wxFreeChart

Post 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
User avatar
doublemax
Moderator
Moderator
Posts: 19116
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Problem installing wxFreeChart

Post 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)?
Use the source, Luke!
MagicznaFlet
Earned a small fee
Earned a small fee
Posts: 12
Joined: Tue Nov 19, 2019 11:17 am

Re: Problem installing wxFreeChart

Post 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
Kvaz1r
Super wx Problem Solver
Super wx Problem Solver
Posts: 357
Joined: Tue Jun 07, 2016 1:07 pm

Re: Problem installing wxFreeChart

Post by Kvaz1r »

Maybe you forgot to add wxFreeChart.lib file in additional dependencies of linker settings?
MagicznaFlet
Earned a small fee
Earned a small fee
Posts: 12
Joined: Tue Nov 19, 2019 11:17 am

Re: Problem installing wxFreeChart

Post 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
Post Reply