Slackware This Forum is for the discussion of Slackware Linux.
|
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
12-01-2006, 11:24 AM
|
#1
|
|
LQ Newbie
Registered: Feb 2004
Distribution: Slackware 10.1
Posts: 24
Rep:
|
OpenGL in Slackware
Hi,
I'm trying to write OpenGL programs in slack and I'm wondering if slack already has the necessary libraries. If not, where can I get them? I'm writing the programs in C so the compiler shouldn't be an issue.
|
|
|
|
12-01-2006, 12:04 PM
|
#2
|
|
Member
Registered: Jan 2006
Location: Missouri
Distribution: Slackware -current, Slackware64 -current, Slackware 12.2
Posts: 135
Rep:
|
As far as I can tell, yes. X11-devel should be the package you want.*
*I'm not 100% sure about this.
|
|
|
|
12-01-2006, 12:35 PM
|
#3
|
|
Member
Registered: Oct 2006
Location: Fayetteville, Arkansas
Distribution: Slackware 11.0
Posts: 36
Rep:
|
bit off topic but FF7 was an awesome game.
|
|
|
|
12-01-2006, 01:18 PM
|
#4
|
|
Senior Member
Registered: Jul 2005
Distribution: Slackware
Posts: 2,006
Rep: 
|
Slack always has everything you need, or really easy to get. I'm assuming that you've already got an OpenGL capable card and drivers that go with it. You will either need GLUT or SDL to setup contexts and other stuff.
|
|
|
|
12-02-2006, 12:23 PM
|
#5
|
|
LQ Newbie
Registered: Feb 2004
Distribution: Slackware 10.1
Posts: 24
Original Poster
Rep:
|
I have an ATI rage 128. It's one of the cards listed when you configure X. OpenGL apps run fine.
When I slocate the header files gl.h and glut.h, I find them in /usr/X11R6/include/GL. Can I use these or do I have to get something else? Also, how would I go about including them as headers in the programs I write?
Thanks
|
|
|
|
12-02-2006, 12:57 PM
|
#6
|
|
Senior Member
Registered: Jul 2005
Distribution: Slackware
Posts: 2,006
Rep: 
|
Yep, those are the headers to use
Code:
#include <GL/gl.h>
#include <GL/glut.h>
|
|
|
|
12-02-2006, 01:31 PM
|
#7
|
|
LQ Newbie
Registered: Feb 2004
Distribution: Slackware 10.1
Posts: 24
Original Poster
Rep:
|
Thanks. I'm thinking I have to compile with linkers too?
|
|
|
|
12-02-2006, 01:54 PM
|
#8
|
|
Senior Member
Registered: Jul 2005
Distribution: Slackware
Posts: 2,006
Rep: 
|
I'm not sure what you mean. Example?
|
|
|
|
12-02-2006, 03:00 PM
|
#9
|
|
LQ Newbie
Registered: Feb 2004
Distribution: Slackware 10.1
Posts: 24
Original Poster
Rep:
|
well in windows I find that I have to add linker flags for my GL programs even with the includes defined. My programs are not compiling thus far, but examples that I've downloaded from the net are doing fine. So I'm thinking maybe I need to use the -L option in gcc to link the libraries too. I'll figure it out 
|
|
|
|
12-02-2006, 03:09 PM
|
#10
|
|
LQ Newbie
Registered: Feb 2004
Distribution: Slackware 10.1
Posts: 24
Original Poster
Rep:
|
I've solved the problem in mere minutes
The command I have to use to compile properly is
gcc -o main main.c -I /usr/X11R6/include/ -L /usr/X11R6/lib/ -lglut -lGL -lGLU -lX11 -lXmu -lXi -lm

|
|
|
|
12-02-2006, 03:34 PM
|
#11
|
|
Senior Member
Registered: Jul 2005
Distribution: Slackware
Posts: 2,006
Rep: 
|
Ah, see that. In *nix, it is custom to compile your stuff into .o files, then link them all together (Windows does that too, but kind of behind your back). With simple one-file programs, the .o step could be skipped like you did in that.
Try removing the -I and -L. Those directories should already be in your include and library paths.
|
|
|
|
12-02-2006, 06:16 PM
|
#12
|
|
LQ Newbie
Registered: Feb 2004
Distribution: Slackware 10.1
Posts: 24
Original Poster
Rep:
|
strangely it doesn't work without linkers. Even with the includes, it did not compile until I linked the libraries directly. I probably just forgot to set a path somewhere.
Thanks for your help. It's working great now 
|
|
|
|
12-02-2006, 07:14 PM
|
#13
|
|
Senior Member
Registered: May 2003
Location: Columbus, OH
Distribution: DIYSlackware
Posts: 1,914
Rep:
|
Quote:
|
Originally Posted by Rayning
bit off topic but FF7 was an awesome game.
|
I thought the same thing when I saw his handle name...
You might get a kick out of this...
http://jaguarlinux.com/pub/sandbox/final-fantasy.avi
Last edited by jong357; 01-11-2007 at 08:17 PM.
|
|
|
|
12-03-2006, 06:50 AM
|
#14
|
|
LQ Newbie
Registered: Feb 2004
Distribution: Slackware 10.1
Posts: 24
Original Poster
Rep:
|
Quote:
|
Originally Posted by jong357
|
her
and oh man that is great. haha. Thanks
|
|
|
|
12-03-2006, 09:07 AM
|
#15
|
|
Senior Member
Registered: May 2003
Location: Columbus, OH
Distribution: DIYSlackware
Posts: 1,914
Rep:
|
Sorry.. The concept of women getting into Linux is still a little alien to me.
That's from Robot Chicken. One of my most favorite shows.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 01:31 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|