How to compile the source OpenGL code:
- Copy the Glut files from the G:\Installs\Students\WIN\Mathsci Software\Glut directory to the following directories:
- GLUT.H ==> C:\Program Files\Microsoft Visual Studio\VC98\Include\GL
- GLUT32.LIB ==> C:\Program Files\Microsoft Visual Studio\VC98\Lib
- GLUT32.DLL ==> C:\(Windows)\System32 (NOTE: in Winnt & Win2000 this is the WINNT directory; in Win9x it's the WINDOWS directory)
You can also download the files by right clicking on each of the links above.
Thanks to Kiran Joshi for this information
To avoid errors at compilation time, in what concerns to OpenGL include only the glut.h header file:
#include <GL/glut.h>
CTRL+F7
CTRL+F5
The OpenGL libraries are available by default at any distribution of Linux, however if you need to install them, here's a couple of links to download freeglut or Mesa:
In order to compile, he commands are:
gcc -o <outputProgram> <sourceCode.c> -lglut -lm
If you're using Mandrake Linux distribution this command might not work, try this one:
gcc -o <outputProgram> <sourceCode.c> -l /usr/X11R6/lib -lglut -lGL -lGLU -lm
More questions? Follow this link: