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 05-05-2004, 09:14 AM   #1
Registered: Nov 2003
Location: Australia
Distribution: Mandrake 9.1
Posts: 41

Rep: Reputation: 15
mesa, glut and compiling opengl


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.


Last edited by adhara; 05-05-2004 at 09:29 AM.
Old 05-06-2004, 05:25 PM   #2
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

For a tutorial and the documentation for SDL go here 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 or do a google search for OpenGL programming.

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

Rep: Reputation: 32
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, 06:14 AM   #4
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.



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 04:08 AM
Mesa-Glut compilation problem tethysgods Linux - Software 1 09-16-2004 01:33 PM
mesa glut libraries adhara Linux - Software 6 05-08-2004 05:45 AM
Compiling a simple Mesa/GLUT program Bojdom Linux - Software 2 02-02-2003 05:19 PM
glut/mesa/openGL gurra Programming 1 10-10-2001 04:36 PM > Forums > Non-*NIX Forums > Programming

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

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