Guidance Forums / wxWidgets (wxWindows) in C++ / wxGLCanvas

Search 搜索
Home Home

Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. wxGLCanvas
Posted by: 2003-11-10 19:31:15
well it's just insane how difficult it is to get opengl to work with wxwindows and mingw.

firstoff i just tried to import the .dsw sample files (cube, penguin, isosurf) into dev-c but that was a total disaster.

i took the minimal wxproject file, made sure it could compile, and tried to write in a wxGLCanvas class:

undefined reference to `wxGLCanvas::wxGLCanvas(wxWindow*, ... etc...

ok. guess something isn't compiled.

then i decided to try the 'hardcore' route and build wxwindows myself, cause apparantly it's better. i downloaded msys and used:

../configure --disable-shared --enable-debug --with-opengl

the cool thing was that this popped out a libwxmsw_gl240d.a file which i assume was the file i needed to get wxglcanvas working in dev-c. so i linked to the new library and got a Huge host (140 in total) of weird and wonderful undefined reference errors:

undefined reference to `_Unwind_SjLj_Resume'  [EXAMPLE]

lots and lots of 'unwind' (what the hell does that mean??)
(anyone know how to search through object files for references?)

ok, so i tried to use msys since it does all the linking and stuff for you. though it was making minimal.exe and wxwizard.exe when i try to make && cube.exe i get Hundreds of the weirdest undefined references ever:

undefined reference to `_imp___ZN10wxTextCtrlD2Ev'
undefined reference to `_imp___ZN10wxNodeBaseC2EP10wxListBasePS_S2_PvRK9wxListKey'
undefined reference to `_imp___ZTV12wxDialogBase'

did i use the wrong parameters in configure?
i used wxwindows2.4.0 and mingw using gcc 3.3.1

thanks for reading this.
Message2. Re: wxGLCanvas
Posted by: guidance 2003-11-10 20:24:10
opengl library itself is not included in wxwindows, there's only interface/wrapper in gl enabled wxwin binary. Try get opengl lib from their home page.
Message3. Re: wxGLCanvas
Posted by: upCASE 2003-11-11 04:22:21
Wel, I enabled wxGL by modifying setup.h, but using configure should be fine, too.
Did you include -lopengl32 and -lglu32 in your linker settings?

I just had a look at the configure options. Maybe try again with
./configure  --disable-shared --enable-debug --with-opengl --with-msw --enable-gui

If it was hard to write, it should be hard to read!- Do. Or do not. There is no try!
Message4. Re: wxGLCanvas
Posted by: 2003-11-12 05:24:21
awesome thanks. i finally got it to work. think it was the --with-msw that i left out. and downloaded wx242.

now i gotta figure out how to make custom makefiles easily....

Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
© Mon 2021-9-20  Guidance Laboratory Inc. Hits:0