|
Department of Computer Science Worcester Polytechnic Institute |
|
MinGW+OpenGL+GLUT "How-to-Install" Page
This page gives a quick explanation of how to install MinGW and OpenGL so that
programs that use OpenGL + GLUT can be compiled and run under Windows.
More information on the MinGW tools can be found
here.
Installing MinGW
- Make a directory "C:\mingw".
- Download the MinGW installer
to your "C:\mingw" directory and run it. Leave the selected items
to install as is, and click "Next."
- Download the MSYS installer
to your "C:\mingw" directory and run it.
- If prompted, annswer "yes" to the finish-up script, and type in the
path to MinGW ("C:/mingw") when prompted.
- Download MSYS DTK 1.0 to your "C:\msys\1.0" directory and run it.
- Download MSYS Core 1.0.11 to your "C:\msys\1.0" directory,
and unzip it there.
- Upon completion, there should be a new item on your desktop to launch the
MSYS shell (it looks like an "M"). Double click it, and you should be at
a nice, Unix-like shell, in your home directory "/home/<your login name>".
- You can now use your editor to create C++ files, save them under this directory somewhere,
and then use "make" to compile them.
- Move on to the "installing GLUT" section below, if you need to.
Installing GLUT
- Download this GLUT archive to your "C:\mingw" directory.
- Unpack the archive, and place the "GL\glut.h" file in "C:\mingw\include\gl" directory,
the "winlib\libglut32win.a" file into the "C:\mingw\lib" directory, and "glut32.dll" into
the "C:\windows\system32" directory (or leave it in the same directory as your executable).
- When compiling, use
#include <gl/glut.h>
to include the glut header.
- When linking, use "-lglut32win" in the link line of your make file.