LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 07-07-2005, 04:02 PM   #1
Last Attacker
Member
 
Registered: Jun 2004
Location: South Africa
Distribution: Ubuntu
Posts: 120

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


Hi,
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.

Thanks!
 
Old 07-08-2005, 07:48 AM   #2
cracauer
Member
 
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, 10:21 AM   #3
deiussum
Member
 
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, 02:16 PM   #4
Last Attacker
Member
 
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 config.in 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, 02:53 PM   #5
Last Attacker
Member
 
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.

Thanks
 
  


Reply



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 10:05 AM
wxwidgets or gtk?? logicalfuzz Linux - Software 3 09-21-2005 12:43 PM
Using OpenGL thru wxWidgets, need help kornerr Programming 5 09-15-2005 10:09 AM
cross platform question GTK+vs.wxwidgets servnov Programming 4 01-09-2005 11:25 AM
Is it possible to use OpenGL with GTK? drdroid Programming 4 05-24-2004 07:06 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:36 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
Open Source Consulting | Domain Registration