MinGW+OpenGL+GLUT "How-to-Install"
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 (http://www.mingw.org/) .
Installing MinGW
- Make a directory "C:\mingw".
- Download the MinGW installer (http://web.cs.wpi.edu/~gogo/courses/mingw/MinGW-5.1.4.exe) to your "C:\mingw" directory and run it. Leave the selected items to install as is, and click "Next."
- Download the MSYS installer (http://web.cs.wpi.edu/~gogo/courses/mingw/MSYS-1.0.10.exe) 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 (http://web.cs.wpi.edu/~gogo/courses/mingw/msysDTK-1.0.1.exe) to your "C:\msys\1.0" directory and run it.
- Download MSYS Core 1.0.11 (http://web.cs.wpi.edu/~gogo/courses/mingw/msysCORE-1.0.11-2007.01.19-1.zip) 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 (http://web.cs.wpi.edu/~gogo/courses/mingw/winglut.zip) 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.