Linking Problems when building RELEASE version - wxFreeChart

Talk here about issues with one of the components hosted at wxCode, or suggest features for it.
bankai09
In need of some credit
In need of some credit
Posts: 2
Joined: Fri Jul 06, 2012 6:02 am

Linking Problems when building RELEASE version - wxFreeChart

Postby bankai09 » Fri Jul 06, 2012 6:17 am

I am trying to build a release version of wxFreechart for days now and I am still stuck with some linking problems. The debug version is no sweat; but the release version is a pain.

I am building it with wxWidgets 2.9.3

how I build my wxWidgets release version :
mingw32-make -f makefile.gcc CPPFLAGS="-Os -pipe -mthreads" CXXFLAGS="-fvisibility=hidden -fvisibility-inlines-hidden -Wno-attributes" LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--as-needed -s" SHARED=1 BUILD=release UNICODE=1 DEBUG_INFO=0 DEBUG_FLAG=0 MONOLITHIC=1 USE_EXCEPTIONS=0 USE_RTTI=0 OFFICIAL_BUILD=1 RUNTIME_LIBS=static

for wxFreechart :
mingw32-make -f makefile.gcc WX_DIR=C:\wxWidgets-2.9.3 WX_UNICODE=1 WX_DEBUG=0 WX_SHARED=1 WX_MONOLITHIC=1 WXDEBUG_LEVEL=1 SHELL=CMD

The Error
g++ -c -o gccmswu_dll\wxFreeChartDemo_dll_xydemos.o -DHAVE_W32API_H -DWXUSINGDLL -D_UNICODE -D__WXMSW__ -IC:\wxWidgets-2.9.3\lib\gcc_dll\mswu -IC:\wxWidgets-2.9.3\includ
e -O2 -W -Wall -I..\include -MTgccmswu_dll\wxFreeChartDemo_dll_xydemos.o -MFgccmswu_dll\wxFreeChartDemo_dll_xydemos.o.d -MD -MP ../sample/xydemos.cpp
../sample/xydemos.cpp:297:6: warning: unused parameter 'ev' [-Wunused-parameter]
if not exist ..\sample mkdir ..\sample
g++ -o ..\sample\wxFreeChartDemo_dll.exe gccmswu_dll\wxFreeChartDemo_dll_bardemos.o gccmswu_dll\wxFreeChartDemo_dll_bubbledemos.o gccmswu_dll\wxFreeChartDemo_dll_combined
axisdemos.o gccmswu_dll\wxFreeChartDemo_dll_demo.o gccmswu_dll\wxFreeChartDemo_dll_democollection.o gccmswu_dll\wxFreeChartDemo_dll_ganttdemos.o gccmswu_dll\wxFreeChartDe
mo_dll_markersdemos.o gccmswu_dll\wxFreeChartDemo_dll_multipleaxisdemos.o gccmswu_dll\wxFreeChartDemo_dll_ohlcdemos.o gccmswu_dll\wxFreeChartDemo_dll_timeseriesdemos.o gc
cmswu_dll\wxFreeChartDemo_dll_xydemos.o -mthreads -LC:\wxWidgets-2.9.3\lib\gcc_dll -L..\lib\gcc_dll -Wl,--subsystem,windows -mwindows ..\lib\gcc_dll\libwxcode_msw29u
_freechart.a -lwxmsw29u -lwxtiff -lwxjpeg -lwxpng -lwxzlib -lwxregexu -lwxexpat -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -
loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 -lodbc32
gccmswu_dll\wxFreeChartDemo_dll_demo.o:demo.cpp:(.rdata$_ZTV7DemoApp[vtable for DemoApp]+0x98): undefined reference to `wxAppConsoleBase::CallEventHandler(wxEvtHandler*,
wxEventFunctor&, wxEvent&) const'
gccmswu_dll\wxFreeChartDemo_dll_demo.o:demo.cpp:(.rdata$_ZTV7DemoApp[vtable for DemoApp]+0x9c): undefined reference to `wxAppConsoleBase::HandleEvent(wxEvtHandler*, void
(wxEvtHandler::*)(wxEvent&), wxEvent&) const'
gccmswu_dll\wxFreeChartDemo_dll_demo.o:demo.cpp:(.rdata$_ZTV7DemoApp[vtable for DemoApp]+0xa0): undefined reference to `wxAppConsoleBase::OnUnhandledException()'
gccmswu_dll\wxFreeChartDemo_dll_demo.o:demo.cpp:(.rdata$_ZTV7DemoApp[vtable for DemoApp]+0xa4): undefined reference to `wxApp::OnExceptionInMainLoop()'
collect2: ld returned 1 exit status


Can you help me? :( What am I missing?

bankai09
In need of some credit
In need of some credit
Posts: 2
Joined: Fri Jul 06, 2012 6:02 am

Re: Linking Problems when building RELEASE version - wxFreeC

Postby bankai09 » Tue Jul 10, 2012 1:19 am

Help. :(

User avatar
doublemax
Moderator
Moderator
Posts: 11536
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Linking Problems when building RELEASE version - wxFreeC

Postby doublemax » Tue Jul 10, 2012 10:02 am

You're building the library with USE_EXCEPTIONS=0. All the unreferenced classes that cause errors, are not available when USE_EXCEPTIONS=0. So you probably have to use the same settings when building wxFreechart.
Use the source, Luke!


Return to “wxCode”

Who is online

Users browsing this forum: No registered users and 1 guest