installing Freeglut on Linux
Asked Answered
T

2

8

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?

Tardy answered 3/7, 2012 at 20:15 Comment(1)
Did you run make before or after the configure script? configure should have informed you of the missing headers.Dissever
D
11

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.

Dissever answered 3/7, 2012 at 20:28 Comment(7)
so what are freeglut3-dev and pkg-config? How do I install freeglut3-dev once I've downloaded it? And how does pkg-config assist in installing freeglut?Tardy
freeglut3-dev is a Debian package name. Mint is Debian/Ubuntu-based. You should be able to install it via sudo apt-get install freeglut3-dev.Dissever
As the linked Wiki article says: "pkg-config is computer software that provides a unified interface for querying installed libraries for the purpose of compiling software from its source code."Dissever
pkg-config won't assist in installing freeglut though it will assist in using it.Dissever
It doesn't seem to be true on Linux Debian. There is no .pc file in freeglut3-dev package for pkg-config.Serenaserenade
@patryk.beza: Fixed 12 years later! See the glut.pc in libglut-dev.Dissever
@Dissever reddit.com/r/debian/comments/14a5ul7/…Serenaserenade
P
6

For installing :

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

For linking :

 g++ .... -lglut -lGL ....
Plated answered 5/9, 2019 at 22:5 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.