LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices



Reply
 
Search this Thread
Old 09-13-2005, 05:54 AM   #1
kornerr
Member
 
Registered: Dec 2004
Location: Russia, Siberia, Kemerovo
Distribution: Slackware
Posts: 893

Rep: Reputation: 35
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.

But:

I can't run wxWidgets OpenGL samples.

Errors
cube.h
cube.cpp
Makefile

What should I do?

Thanks.

Last edited by kornerr; 09-13-2005 at 05:55 AM.
 
Old 09-13-2005, 06:03 AM   #2
kornerr
Member
 
Registered: Dec 2004
Location: Russia, Siberia, Kemerovo
Distribution: Slackware
Posts: 893

Original Poster
Rep: Reputation: 35
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:
Code:
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?

Thanks.
 
Old 09-13-2005, 11:40 AM   #3
deiussum
Member
 
Registered: Aug 2003
Location: Santa Clara, CA
Distribution: Slackware
Posts: 895

Rep: Reputation: 32
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/libwx_gtk_gl-2.4.so, so it's possible you need to change -lwx_gtk_gl to -lwx_gtk_gl-#.# where #.# is the version you have installed.
 
Old 09-14-2005, 05:52 AM   #4
kornerr
Member
 
Registered: Dec 2004
Location: Russia, Siberia, Kemerovo
Distribution: Slackware
Posts: 893

Original Poster
Rep: Reputation: 35
"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?

Thanks.
 
Old 09-14-2005, 10:39 AM   #5
deiussum
Member
 
Registered: Aug 2003
Location: Santa Clara, CA
Distribution: Slackware
Posts: 895

Rep: Reputation: 32
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.
 
Old 09-15-2005, 11:09 AM   #6
kornerr
Member
 
Registered: Dec 2004
Location: Russia, Siberia, Kemerovo
Distribution: Slackware
Posts: 893

Original Poster
Rep: Reputation: 35
Thanks, deiussum.

I needed "lwx_gtk2_gl-2.6"
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
wxWidgets kornerr Programming 2 10-13-2005 11:05 AM
wxwidgets or gtk?? logicalfuzz Linux - Software 3 09-21-2005 01:43 PM
GTK, wxWidgets and OpenGL :( Last Attacker Programming 4 07-09-2005 03:53 PM
wxwidgets, anyone used it? acidjuice Programming 6 03-31-2005 04:28 AM
wxwidgets and audacity slinky2004 Linux - Newbie 9 10-19-2004 03:03 PM


All times are GMT -5. The time now is 07:51 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration