OpenGL installation method on Ubuntu 14.04

This method will also work on Almost all versions of Ubuntu .
Open your terminal and first install necessary libraries to build our packages.

sudo apt-get install build-essential

Now we are ready to install FreeGlut. Lets install them using this command on our terminal

sudo apt-get install freeglut3 freeglut3-dev

Optional  :

We need one last library which is names “libglui2c2”download  And install it with this command.

dpkg -i libglui2c2_2.36-4_amd64.deb

Now open a file with your favorite text editor. In this case i will use Geany as my IDE. Create a new file. And write some Opengl code. Now to compile that file you have to reference OpenGL library that you have used. So, at the begining of your code, include this library.

#include <GL/glut.h>


Save the file. Now you have to compile the file. Open your terminal. Go to the directory your files are situated. Lets assume the file you are now working on is named “test.c” . To compile “test.c” input this command on your terminal.

gcc -o test test.c -lglut -lGL -lGLU

Here “test” is the output file. To execute the output file just input


Thats it !   Enjoy ...................................

Next Post »

Please Leave ur Valuable comments Here ConversionConversion EmoticonEmoticon


HTML Comment Box is loading comments...

Our Partners

Our Partners