Page 1 of 1

wxFreeChart build Error

Posted: Tue Mar 24, 2015 7:35 am
by frog
I work on ms + codeblocks + wxWidgets-2.9.4. I want to get wxFreeChart. I download from
As his ReadMe.txt, I built it by 'mingw32-make -fmakefile.gcc WX_DIR=wxWidgets-2.9.4 WX_UNICODE=1 WX_DEBUG=1 WX_SHARED=1 WX_MONOLITHIC=1'.
Get many error message. putting the message in text file , get as following
if not exist ..\lib\gcc_dll mkdir ..\lib\gcc_dll
g++ -c -o gccmswud\wxfreechart_dll_legend.o -DHAVE_W32API_H -DWXUSINGDLL -D_UNICODE -D__WXDEBUG__ -D__WXMSW__ -Ic:\wxWidgets-2.9.4\lib\gcc_dll\mswud -Ic:\wxWidgets-2.9.4\include -O0 -g -W -Wall -I..\include -DWXMAKINGDLL_FREECHART -MTgccmswud\wxfreechart_dll_legend.o -MFgccmswud\wxfreechart_dll_legend.o.d -MD -MP ../src/legend.cpp
makefile.gcc:521: recipe for target 'gccmswud\wxfreechart_dll_legend.o' failed
Please , help me to fix the problem.

Re: wxFreeChart build Error

Posted: Fri Mar 27, 2015 11:43 am
by jaxsin
from what little experience I have, I would suggest that you double check how you built wxWidgets. I know when I built wxFreeChart I had to use multi lib. You can check to see by looking into your wx install and check to see if you built with monolithic or multilib. That will probably fix a lot of your issues. Make sure you are building it with the correct parameters

Also, you will need to link it to 30 lib's if you are using wxWidgets >= 3.0, the wxFreeChart was originally linked using 28 libs and so these will need to be updated. I don't know how to do that as I use visual studio, you will need to figure that out on your own. Which is more then likely your other problem.

Re: wxFreeChart build Error

Posted: Sat Mar 28, 2015 4:01 am
by frog
Thanks, Jaxin's instruct.
Try all possibility. Like WX_UNICODE=1 WX_DEBUG=1 WX_SHARED=1 WX_MONOLITHIC=1, WX_UNICODE=0 WX_DEBUG=1 WX_SHARED=1 WX_MONOLITHIC=1...16 times. As before, I get Error.
The major error is :
makefile.gcc:521:recipe for target 'gccmswnd\wxfreechart_dll_legend.o' failed
mingw32-make: *** [gccmswud\wxfreechart_dll_legend.o] Error 1.
wxWidgets version is 2.9.4.

Have any more idea to help me.

Re: wxFreeChart build Error

Posted: Sat Mar 28, 2015 12:15 pm
by jaxsin
I'm not entirely positive but I thought I read somewhere that wxFreeChart did not build on 2.9 error free

Like I said, I managed to get it to build on 3.0 and getting it configured properly was the biggest hurdle. I don't know much about Makefile or gcc as I use VS. But the error sounds like it is a setup parameter in Makefile. I'd start there and work backwards validating the build configuration

sry can't be of more help

Re: wxFreeChart build Error

Posted: Mon Mar 30, 2015 7:49 am
by frog
Thanks, reply.
I re-install wxWidgets with 2.8.12 and build it.
I got ld.exe -lwxmsw28u_gl error when built wxFreeChart. check C:\wxWidgets-2.8.12\lib\gcc_lib folder, there is not wxmsw28u_gl. I think I do something error on wxWidgets. I built wxWidgets by "mingw32-make -f makefile.gcc MONOLITHIC=0 SHARED=1 UNICODE=1 BUILD=release".
Could help me to fixed the error.