Sunday, December 26, 2010

Installing GLUT on Ubuntu

Installing GLUT is essential for those who wants to create OpenGL programs in Linux.

To install GLUT on Ubuntu, just simply go to System>Administration>Synaptic Package Manager then search for "glut". Mark freeglut3 and freeglut3-dev for installation then click on Apply button.

This will install the OpenGL header files to /usr/include/GL/ and the library object to /usr/lib/libglut.a.

Compiling C++ Source Files

By default, Ubuntu 10.04 and 10.10 is installed without a developer's tools. So if you're a C++ programmer or just someone who needs to execute the "make" command using the terminal but encountering error like the example below:
make: g++: Command not found

Then all you have to do is run the following command in your terminal:
sudo apt-get install g++

When you encounter the said error, it only means that you have lack of compiler to compile the source codes. Just by installing g++ will do the trick.

Happy Coding :)