LinuxQuestions.org
Register a domain and help support LQ
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 05-05-2004, 08:14 AM   #1
adhara
Member
 
Registered: Nov 2003
Location: Australia
Distribution: Mandrake 9.1
Posts: 41

Rep: Reputation: 15
mesa, glut and compiling opengl


Hello,

I am running Mandrake 9.1.
I have installed mesa 5.0 installed.

I need to know whether any further installations are required in order to compile opengl.

I do have a copy of the glut-3.7 src file but I am having difficulty with the make file. It complains that it can't find glu.h glut.h and gl.h in the locations where the files DO exist in the src file location.

Anyway - I don't understand whether it is necessary to install glut 3.7 if I already have mesa installed.

At the moment, I cannot compile opengl (g++ ) because it cannot find glu.h no such file or directory.

#include <GL/glut.h>


Question: If glu.h gl.h and glut.h are the same thing why is it stating an error regarding glu.h and not glut.h?

I am a bit lost.

Help sincerely appreciated.


Adhara.

Last edited by adhara; 05-05-2004 at 08:29 AM.
 
Old 05-06-2004, 04:25 PM   #2
The_Nerd
Member
 
Registered: Aug 2002
Distribution: Debian
Posts: 540

Rep: Reputation: 32
Wrong wrong wrong!!!

OpenGL is installed by defualt with mandrake. If you have an Nvidia video card, then it is reinstalled with the drivers. So DON'T installed mesa. As for glut, it SUCKS! Use SDL instead, wich is also installed by defualt, if not try www.libsdl.org.

For a tutorial and the documentation for SDL go here http://sdldoc.csn.ul.ie. As for the missing gl.h and glu.h (wich are NOT the same, and also not the same as glut.h), you probably don't have the right search path. Try adding '-I/usr/include/GL' as a command line switch to g++ (without the quotes of course). If you still have problems, goto http://nehe.gamedev.net or do a google search for OpenGL programming.

Hope I helped!
 
Old 05-06-2004, 04:48 PM   #3
deiussum
Member
 
Registered: Aug 2003
Location: Santa Clara, CA
Distribution: Slackware
Posts: 895

Rep: Reputation: 31
Sometimes the gl headers are put into /usr/X11R6/include/GL. If they are, try adding -I/usr/X11R6/include to your command line. Note, you do NOT want to use -I/usr/include/GL. You generally should include your GL files like so: #include <GL/gl.h> // note case, very important.

Trying to add -I/usr/include/GL will just add that to your search path, so it would search for /usr/include/GL/GL/gl.h... You could theoretically do #include <gl.h> and add -I/usr/include/GL, but pretty much every sample code you are going to find is going to include it as GL/gl.h....
 
Old 05-08-2004, 05:14 AM   #4
adhara
Member
 
Registered: Nov 2003
Location: Australia
Distribution: Mandrake 9.1
Posts: 41

Original Poster
Rep: Reputation: 15
Thank you both Dellisium and the Nerd very much.

I was missing glu.h

Although I said "It complains that it can't find glu.h glut.h and gl.h in the locations where the files DO exist in the src file location."

I was in fact missing glu.h because I didn't have the mesa-devel package installed. I could then install freeglut successfully.

It works!

So Nerd, when you say not to install mesa, do you mean that its not necessary? I'm also curious as to what is bad about glut and what (in your experience) makes sdl better.


Thanks again.

Adhara
 
  


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
compiling mesa (opengl) shegay18 Programming 2 07-12-2005 03:08 AM
Mesa-Glut compilation problem tethysgods Linux - Software 1 09-16-2004 12:33 PM
mesa glut libraries adhara Linux - Software 6 05-08-2004 04:45 AM
Compiling a simple Mesa/GLUT program Bojdom Linux - Software 2 02-02-2003 04:19 PM
glut/mesa/openGL gurra Programming 1 10-10-2001 03:36 PM


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

Main Menu
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