Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

installing Freeglut on Linux

I am trying to install freeglut on my computer running Linux Mint. I follow the steps on this website: http://freeglut.sourceforge.net/docs/install.php. When I do make all in the src directory, it gives the following error:

fatal error: GL/gl.h

This error was given by ../include/GL/freeglut_std.h. Upon inspection, the include/GL directory is indeed devoid of any gl.h file. It is also missing glu.h, which freeglut_std.h also tries to #include. What should I do about this? Why are gl.h and glu.h missing?

like image 409
rurouniwallace Avatar asked Jul 03 '12 20:07

rurouniwallace


2 Answers

I'd recommend installing the freeglut3-dev package instead of building from source. That will give you useful stuff like automatic updates and proper pkg-config entries that you can reference in your makefiles.

If you're dead-set on building freeglut from source you'll probably need the libgl1-mesa-dev and (maybe) libglu1-mesa-dev packages.

like image 129
genpfault Avatar answered Sep 28 '22 08:09

genpfault


For installing :

  1. sudo apt-get install freeglut3 freeglut3-dev libglew-dev
  2. sudo apt-get install mesa-utils

For linking :

 g++ .... -lglut -lGL ....
like image 21
Mhadhbi issam Avatar answered Sep 28 '22 07:09

Mhadhbi issam