-   Programming (
-   -   Using OpenGL thru wxWidgets, need help (

kornerr 09-13-2005 04:54 AM

Using OpenGL thru wxWidgets, need help
I'm following OpenGL Game Development book. It describes the creation of Editor and Engine (unfortunately, using VC++).
I need to create a simple User Interface to use OpenGL thru it.
Some people advised me to use wxWidgets... and it seems quite good to me.


I can't run wxWidgets OpenGL samples.


What should I do?


kornerr 09-13-2005 05:03 AM

Well, sorry. I'm a fool.
I've made a little editing in cube.cpp and spoiled it a bit:)

But here's the error I get now:

kornerr@darkstar:~/cpp/wx/samples/opengl/cube$ make
g++ -c `wx-config --cxxflags` -o cube.o cube.cpp
g++ -o cube cube.o `wx-config --libs` -lwx_gtk_gl -lGL -lGLU
/usr/lib/gcc-lib/i486-slackware-linux/3.3.4/../../../../i486-slackware-linux/bin/ld: cannot find -lwx_gtk_gl
collect2: ld returned 1 exit status
make: *** [cube] Error 1

What libraries am I missing?
Or there's smth wrong with my Gtk?


deiussum 09-13-2005 10:40 AM

It's not finding your wx_gtk_gl library, either because you don't have it installed, or it's not in your search path. If it is installed, add the path to it in your search path by using -L/path/to/lib.

I just did a quick search on my system and found /usr/local/lib/, so it's possible you need to change -lwx_gtk_gl to -lwx_gtk_gl-#.# where #.# is the version you have installed.

kornerr 09-14-2005 04:52 AM

"slocate libwx_gtk_gl" gives me nothing.
I've installed wxWidgets, but why don't I have this lib? Is this a part of wxWidgets?
What should I do?


deiussum 09-14-2005 09:39 AM

I don't remember for sure, but I seem to recall having to compile wxWidgets with OpenGL support. I never really did much with OpenGL in wxWidgets beyond getting a simple app working.

kornerr 09-15-2005 10:09 AM

Thanks, deiussum.

I needed "lwx_gtk2_gl-2.6" :)

All times are GMT -5. The time now is 02:02 PM.