Problem using wxGLcanvas with Dev-C++

If you are using wxDev-C++ for your wxWidgets design, please ask your questions here instead of in IDE Related.
Post Reply
Jardel
In need of some credit
In need of some credit
Posts: 1
Joined: Fri Oct 22, 2004 10:52 am
Contact:

Problem using wxGLcanvas with Dev-C++

Post by Jardel »

When I want to compile the cube example of wxWindows and OpenGL I've this error :

[Linker error] undefined reference to `wxGLCanvas::sm_eventTable'
[Linker error] undefined reference to `wxGLCanvas::wxGLCanvas(wxWindow*, wxGLCanvas const*, int, wxPoint const&, wxSize const&, long, wxString const&, int*, wxPalette const&)'
etc...

I've configure Dev-C++ 4.9.9.0 to use wxWindows but when I use wxGLCanvas I've this error all the time.

-> I've see a post about this problem at http://forums.wxwidgets.org/viewtopic.php?t=31
but I can't know how to do to rebuild jpg, png, zlib, etc...
with Dev-C++

Help me please.
gururamnath
Super wx Problem Solver
Super wx Problem Solver
Posts: 466
Joined: Sat Sep 18, 2004 2:49 am
Location: California, USA

Post by gururamnath »

I guess you have to include the libs that might end with the letters "gl" like libwxmsw25_gl.a and libwxmsw25_ogl.a I'm not sure which version of wx your are using, let us know which dev-pak you are using.
geon
I live to help wx-kind
I live to help wx-kind
Posts: 189
Joined: Tue Sep 07, 2004 4:10 pm
Location: Sweden, Uppsala

Post by geon »

The OpenGL part of wx is not compiled in by default. You will need to download the wx source and compile it yourself.
mitch
Earned a small fee
Earned a small fee
Posts: 16
Joined: Wed Sep 15, 2004 1:04 pm

Post by mitch »

To be a bit more specific than geon, in the setup.h file for your wxWidgets libraries, there is a constant called wxUSE_GLCANVAS which defaults to 0. Set it to 1, rebuild the wx libs and I believe that should fix the problem.
Mr. Lane
Experienced Solver
Experienced Solver
Posts: 57
Joined: Tue Dec 28, 2004 12:19 pm

Post by Mr. Lane »

How does one rebuild the wx libs in DevC++. I used the devpack so i never had to compile.

I downloaded the source now and tried to make a DevC++ project from the wxWindows.dsw, but i have no luck compiling it. It runs into compiler errors immediately. I also i dont know how to make DevC++ compile wxWindows as a series of libs as opposed to a whole exe...

Any help? Even better, does anyone have precompiled libs with glCanvas enabled? I have to say this is most annoying...
geon
I live to help wx-kind
I live to help wx-kind
Posts: 189
Joined: Tue Sep 07, 2004 4:10 pm
Location: Sweden, Uppsala

Post by geon »

You will need those files:
rm.com
cp.com
mv.com

Add them to the "bin" directory of Dev-C++.


In the file commctrl.h you might need to set this #if to 1;

#if 1
#define _WIN32_IE 0x0300
#endif


Set GL_CANVAS to true in this file:
include\wx\msw\setup.h




Paste this into a *.bat file in the base-directory of wx;

Code: Select all

SET MINGWDIR=c:\dev-cpp

PATH=%MINGWDIR%\bin;%PATH%
set BISON_SIMPLE=%MINGWDIR%\share\bison.simple
set BISON_HAIRY=%MINGWDIR%\share\bison.hairy

cd build\msw
make -f makefile.gcc BUILD=clean USE_OPENGL=1 DEBUG_FLAG=0 DEBUG_INFO=0

Run the *.bat file. Wait for 20 min.
Mr. Lane
Experienced Solver
Experienced Solver
Posts: 57
Joined: Tue Dec 28, 2004 12:19 pm

Post by Mr. Lane »

geon wrote:You will need those files:
rm.com
cp.com
mv.com
I dont have these, and google doesnt help me find them. Can you tell me how to get them?
geon
I live to help wx-kind
I live to help wx-kind
Posts: 189
Joined: Tue Sep 07, 2004 4:10 pm
Location: Sweden, Uppsala

Post by geon »

I found this link:
ftp://biolpc22.york.ac.uk/pub/ports/mingw32/extra.zip
(but it didn't seem to work.)
mjs
Experienced Solver
Experienced Solver
Posts: 93
Joined: Wed Feb 09, 2005 3:53 am
Contact:

Post by mjs »

You might also take a look at http://unxutils.sourceforge.net

Regards,
Mark
Post Reply