Installing OpenGL & GLUT on Windows 98, NT and Win 2K

Installing the OpenGL run-time libraries

The latest OpenGL run-time libraries from Microsoft are included in Windows 98, NT and Win 2K. The files are opengl32.dll and glu32.dll.
Installing developer's header files and libraries for Microsoft's OpenGL
1. Install MS Visual Studio. Visual Studio will install the needed header files and libraries.

Installing glut

1.Download glut.
2. Unzip glut**

3. Copy glut32.dll to

Win 98: windows\system
NT or Win 2K: winnt\system32
      4. Copy glut32.lib to Program Files\ MS Visual Studio\VC98\lib\..

      5. Copy glut.h to Program Files\ MS Visual Studio\VC98\include\gl.

Building an OpenGL/GLUT program

1. Download Ed Angel's code examples from

2. Start with gasket.c
3. Open Visual C++ and create a new project (File->New-> projects)
4. Select ĎWin32 Console ApplicationÓ and name your project gasket or whatever you want. Click OK
5. Select ĎAn empty projectÓ and click finish.
6. Insert project files. Project->Add to Project-> files. Find, select gasket.c
7. Linking libraries.
Project->Settings. Select ĎLinkÓ tab.  In the Object\libraries field, type:

 opengl32.lib glu32.lib glut32.lib

8. Comment out the line #include <GL\gl.h>. The header file glut.h includes gl.h.
9. Compile your program.

Note 0: If you have problems compiling Angel's programs, do the following:

Comment out the line long random( ), find all occurrences of random( ) and change them to rand( ). Ignore the warning Warning: const 'double' to 'float', may lose information. If you find that warning annoying do the following:

Find the line glColor3f( 1.0, 0.0, 0.0 ) and change it to glColor3f( 1.0f, 0.0f ,0.0f ).

Note 3: Getting rid of the console window.

1. Go to Project->Settings->Link->Project Options
2. In the Project Options field find:
/subsystem:console (it's one of the last lines)
change it to
/subsystem:windows /entry:mainCRTStartup
Note that error messages and output will be lost (unless redirected) if you get rid of the console window.

Installing MUI

1. Copy mui.lib to <drive>:\Program Files\Microsoft Visual Studio\VC98\Lib\

2. Create a folder named "mui" and add the file: mui.h
Copy the folder "mui" to <drive>:\Program Files\Microsoft Visual Studio\VC98\include\
3. To use mui in your programs, you need to add mui.lib to your OpenGL/GLut project (Project->Settings->Link->Object/library modules ) and the header file mui.h to your source code.
4. Test using any of these files: mui_test.c, multi_test.c,

If you have problems send e-mail to


I wrote these instructions based on a document written by

David Marsland
MTS, Customer Education
Silicon Graphics, Inc
I lost the link to the original document, so I can't include it.

Guillermo Vargas

created:  06-12-00
Last update: 02-06-02