How to Setup OpenGL Programs

To run the Open GL program you need to follow the following steps
Step 1- Install Visual Studio 6 or higher version on your machine
Step 2– Add the OpenGL library to the installation folder of Visual Studio 6 this will be done in the following steps
  • Download GLUT library from the following link http://www.xmission.com/~nate/glut.html or google for “Download GLUT Library”
  • You will find 3 files glut32.lib, glut32.dll and glut.h files, Copy the glut32.dll file and put it under the C:\Windows\System32 path
  • About the glut32.lib you go to the installation folder of the Visual studio and put a copy of glut32.lib  the path of libraries folder C:\Program Files\Microsoft Visual Studio\VC98\Lib.
  • Copy the glut.h file and send it to the header files in the installation path for Visual Studio C:\Program Files\Microsoft Visual Studio\VC98\Include\GL.
Step 3– Open the attached program in Visual C++, and add the following path to linked libraries as Follow:
Click Project -> settings add the following line in the link tab

OpenGL32.lib GLu32.lib

VC++ Setup

This way you will run the program without any compilation error.