Visit Jeremy's Blog.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
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.


  Search this Thread
Old 07-07-2005, 05:02 PM   #1
Last Attacker
Registered: Jun 2004
Location: South Africa
Distribution: Ubuntu
Posts: 120

Rep: Reputation: 15
GTK, wxWidgets and OpenGL :(

I'm using wxWidgets 2.5.4 for Windows and Linux.

I'm using wx-devcpp for the windows version of my app and KDevelop for the Linux version. Problem is that I'm having linker errors with the gtk gl libs or something, can't surely remember, in KDev in Linux (SuSE 9.1). I have gotten gtk and opengl to link in my app its just the gtk and ogl mix that I can't seem to fix.
I have to include something like a -lgtk_gl parameter (something like that) but I don't know where and I've tried just about everything.

Can anyone please help? It's for our 3rd Year project at our uni. MUST COMPILE UNDER LINUX. The Windows version works ok.

Old 07-08-2005, 08:48 AM   #2
Registered: Jul 2004
Location: Boston, MA, USA
Distribution: FreeBSD, Debian/AMD64, Ubuntu/i386
Posts: 59

Rep: Reputation: 15
It will be difficult to help you if you don't cut'n'paste the error messages...
Old 07-08-2005, 11:21 AM   #3
Registered: Aug 2003
Location: Santa Clara, CA
Distribution: Slackware
Posts: 895

Rep: Reputation: 32
If the problem is just that you need to add -lgtk_gl to the linker parameters, then look through the project options in KDevelop until you find a place to provide linker options. I don't use KDevelop much myself so I can't tell you exactly where you would find that.

Depending on your actual errors, you may need other libraries as well. Like perhaps -lGL -lGLU... And you may need to add the path to those libraries to the library search path with something like -L/path/to/additional/libraries.
Old 07-08-2005, 03:16 PM   #4
Last Attacker
Registered: Jun 2004
Location: South Africa
Distribution: Ubuntu
Posts: 120

Original Poster
Rep: Reputation: 15
Ok, I have to add " -lwx_gtk_gl " to a ... wx-config --libs but I have no idea, plus I tried adding that to KDevelop's link field in the config window (whatever you call it).
I remember adding that line to a wx-config line in the file and then when I tried compiling, the compiler kept spatting out something like : "nothing to make". Sorry I stopped trying a week or so ago.

I'm just trying as a dummy test to compile the penguin example from wxWidgets in KDevelop.
I added the -lGL and -lGLU to the linker field, and since that I havn't got linker errors for the opengl functions.

If someone already did this or know how to compile a program like the penguin example, please reply. Because I can then follow the same steps to compiling our 3rd year project prog. I once got it to compile in linux but I had to disable the opengl stuff.

Thanks, I hope this is all the info you need to help me out.
Old 07-09-2005, 03:53 PM   #5
Last Attacker
Registered: Jun 2004
Location: South Africa
Distribution: Ubuntu
Posts: 120

Original Poster
Rep: Reputation: 15
Ok it looks like you guys didn't understood me, I'll try to explain better.

I just want to get the pengiun example of wxWidgets to compile and link successfully through KDevelop. I know it has a makefile and all I type is 'make' and it gets compiled but I've imported those stuff into a KDev project and I just want to set it up sothat I can compile with KDev which obviously uses GCC.

All I sitll have to figure out is the ' -lwx_gtk_gl ' part. What I have determined was that calling wx-config --libs -lwx_gtk_gl, gives a couple of library names with the -l prefices. I copied those into the linker field in KDev's config window and if I can remember correctly, thats when the compiler kept saying "nothing to compile" or something.

I hope it helps.



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
Using OpenGL thru wxWidgets, need help kornerr Programming 5 09-15-2005 11:09 AM
cross platform question GTK+vs.wxwidgets servnov Programming 4 01-09-2005 12:25 PM
Is it possible to use OpenGL with GTK? drdroid Programming 4 05-24-2004 08:06 AM > Forums > Non-*NIX Forums > Programming

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

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