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**dlls.zip.
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 ftp://ftp.aw.com/cseng/authors/angel/intcg/
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.
If you have
problems send e-mail to gvargas@castor.csustan.edu
Credits
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