Fatal error: gl/glut.h: no such file or directory

I'm attempting to write a program and I keep getting this error:

Fatal error: gl/glut.h: no such file or directory

I've read through other similar problems that people were having, and nothing has worked for me. What can I do to solve this problem?

0

2 Answers

On Ubuntu 13.10 this file is available in the freeglut3-dev package.

$ sudo apt-get install freeglut3-dev

You must also be aware that C++ and Ubuntu are both case-sensitive. The correct include line in your program is:

#include <GL/glut.h>

The upper-case "GL" is important.

1

On a Debian based system, do

sudo apt-get install libglfw3-dev libgl1-mesa-dev libglu1-mesa-dev

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like