User forums > General (but related to Code::Blocks)

wxPlotWindow problems

(1/2) > >>

elettronica67:
Hi to all,

I am new of this forum, and I have a problem using the wxPlotWindow class.

When I write:

wxPlotWindow *m_plot;
m_plot = new wxPlotWindow( this, wxID_ANY, wxPoint(0,0), wxSize(100,100), wxSUNKEN_BORDER | wxPLOT_DEFAULT );

the linker generates the following error message:

undefined reference to `_imp___ZN12wxPlotWindowC1EP8wxWindowiRK7wxPointRK6wxSizei'

I have compiled the sample code contained in the wx-widgets sources about the plot feature (importing the codeblocks project) an on this sample all seems to run well. I have included the same libraries on my project and it does'nt work.
I have done a lot of tests but always I have the linker error.

Can someone help me?

Thanks in advance.

stahta01:
Link to the library that contains wxPlotWindow.

Edit: I think the library is called wxmsw28u_plot.

To help you please post the "Build Log" after turning in Full Compiler Log. See link on how to change logging.
http://wiki.codeblocks.org/index.php?title=FAQ#Q:_How_do_I_troubleshoot_an_compiler_problem.3F

Tim S

elettronica67:
Thank You!

I will try very close.

Regards

elettronica67:
Hi,

I have included the library wxmsw28d_plot (i am compiling in debug mode)

Following you can find the build logger:


-------------- Build: Debug in mis ---------------

mingw32-g++.exe -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL  -Wall  -g -D__WXDEBUG__    -IC:\wxMSW287\include -IC:\wxMSW287\contrib\include -IC:\wxMSW287\lib\gcc_dll\mswd  -c C:\prog\TEMP\cb\mis\mis\misMain.cpp -o obj\Debug\misMain.o
windres.exe -i C:\prog\TEMP\cb\mis\mis\resource.rc -J rc -o obj\Debug\resource.res -O coff -IC:\wxMSW287\include -IC:\wxMSW287\lib\gcc_dll\mswd
mingw32-g++.exe -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL  -Wall  -g -D__WXDEBUG__    -IC:\wxMSW287\include -IC:\wxMSW287\contrib\include -IC:\wxMSW287\lib\gcc_dll\mswd  -c C:\prog\TEMP\cb\mis\mis\misApp.cpp -o obj\Debug\misApp.o
mingw32-g++.exe -LC:\wxMSW287\lib\gcc_dll -Lc:\wxMSW287\lib\vc_lib -Lc:\wxMSW287\lib\gcc_lib  -o bin\Debug\mis.exe obj\Debug\misMain.o obj\Debug\misApp.o  obj\Debug\resource.res   -lwxmsw28d_plot -lwxmsw28d  -mwindows
obj\Debug\misMain.o: In function `ZN8misFrameC2EP8wxWindowi':
C:/prog/TEMP/cb/mis/mis/misMain.cpp:96: undefined reference to `_imp___ZN12wxPlotWindowC1EP8wxWindowiRK7wxPointRK6wxSizei'
obj\Debug\misMain.o: In function `ZN8misFrameC1EP8wxWindowi':
C:/prog/TEMP/cb/mis/mis/misMain.cpp:96: undefined reference to `_imp___ZN12wxPlotWindowC1EP8wxWindowiRK7wxPointRK6wxSizei'
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 6 seconds)
2 errors, 0 warnings
 
Thank you

stahta01:

--- Quote ----LC:\wxMSW287\lib\gcc_dll -Lc:\wxMSW287\lib\vc_lib -Lc:\wxMSW287\lib\gcc_lib

--- End quote ---

Having these 3 together is wrong!

Are you doing GCC?
Are you doing wxWidgets DLL?

If yes to both, then -LC:\wxMSW287\lib\gcc_dll is right one to use; get rid of the other two.

Tim S

Navigation

[0] Message Index

[#] Next page

Go to full version