[wx-dev] wxGLCanvas
Peter Marino
pwm at esoft.dk
Thu Nov 2 01:16:35 PST 2006
hi wx-user & Stefan,
Thanks for the point in the right direction. I have changed the order,
was a little difficult because I was using kdevelop build options and
automake-manager to setup the libraries and getting them to play
together was almost impossible.
I decided to write it in the Makefile.am as:
Hole_LDFLAGS=$(top_builddir)/SigmaWindow/libSigmaWindow.a \
`$(top_srcdir)/Linux/wxWidgets/build-debug/wx-config --static --libs
gl,core,base`
and this seems to work, which is great. Only need to find out how to
make it change wx builds depending on which configuration I use in
kdevelop (i.e. debug, release, other )
regards,
Peter
Stefan.Neis at t-online.de wrote:
> Hi,
>
> (snipp)
>> In kdevelop I added this to "linker flags (LDFLAGS)" in the project options:
>> "$(../Linux/wxWidgets/build-debug/wx-config --static --libs gl,core,base)"
> (snipp)
>
> Keep in mind that the linker is sensitive to the ordering of arguments you pass
> to it, i.e. make sure that this stuff is appended at the _end_ of the linker
> options.
>
> (nipp)
>> The program compiles just fine, but I get a linker error I just don't
>> understand:
> (snipp)
>> /home/pwm/Projects/Axiom/Linux/wxWidgets/build-debug/lib/libwx_gtk2d_gl-27.a
>> /home/pwm/Projects/Axiom/Linux/wxWidgets/build-debug/lib/libwx_gtk2d_core-2.7.a
>> /home/pwm/Projects/Axiom/Linux/wxWidgets/build-debug/lib/libwx_based-2.7.a
>> -L/usr/lib /usr/lib/libGLU.so /usr/lib/opengl/nvidia/lib/libGL.so
> (snipp)
>> -ldl ../../SigmaWindow/libSigmaWindow.a
> (snipp)
>
> See? You now have libwx_gtk2d_gl-2.7.a _before_ the libSigmaWindow.a, so
> any references from libSigmaWindow.a to libwx_gtk2d... will remain unresolved,
> i.e. you get exactly this kind of error:
>
> (snipp)
>> .../../SigmaWindow/libSigmaWindow.a(SwPanelView.o): In function
>> `CSwPanelView::CreateControls()':
>> /home/pwm/Projects/Axiom/SigmaWindow/SwPanelView.cpp:53: undefined
>> reference to `wxGLCanvas::wxGLCanvas(wxWindow*, wxGLCanvas const*, int,
>> wxPoint const&, wxSize const&, long, wxString const&, int*, wxPalette
>> const&)'
>> collect2: ld returned 1 exit status
> (snipp)
>> so what am I doing wrong?
>
> Make sure that the output of wx-config "... --libs ..." is at the end of the linker command
> and everything should be fine.
>
> HTH,
> Stefan
>
> P.S.: wx-users would have been more appropriate.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wx-dev-unsubscribe at lists.wxwidgets.org
> For additional commands, e-mail: wx-dev-help at lists.wxwidgets.org
>
More information about the wx-dev
mailing list