A. If you have a Mac
OS System, GLUT is already installed on
your computer.
All you need to do is switch the include file from
<GL/glut.h> under
Windows to <GLUT/glut.h> under
Mac OS System
If you do switch between
Windows and Mac OS, you can do the following
to let the compiler include glut.h from the right place based on the platform:
#ifdef __APPLE__
# include <OpenGL/gl.h>
# include <OpenGL/glu.h>
# include <GLUT/glut.h>
#else
# include <GL/gl.h>
# include <GL/glu.h>
# include <GL/glut.h>
#endif
B. How to install on
Windows
Download GLUT from http://www.xmission.com/~nate/glut/glut-3.7.6-bin.zip
First check if you have a 32-bit or 64 bit system.
http://support.microsoft.com/kb/827218
1. Download and unzip http://www.xmission.com/~nate/glut/glut-3.7.6-bin.zip
For 32-bit Systems
1. Place glut32.dll into the windows system folder
C:\Windows\system32
2. Go to the folder of your Visual Studio (may differ
based on your version)
C:\Program
Files\Microsoft Visual Stuido 10.0\VC\include (for VS 2010)
C:\Program
Files\Microsoft Visual Studio 12.0\VC\include (for VS 2013)
3. Create a new
folder named "GL" (without the quotes) in that folder above.
4. Now copy glut.h in the folder you just created.
5. Find the library folder at
C:\Program
Files\Microsoft Visual Studio 10.0\VC\lib (for VS 2010) or
C:\Program
Files\Microsoft Visual Studio 12.0\VC\lib (for VS 2013)
6. Copy glut32.lib into that folder.
For 64-Bit Systems
1. Place glut32.dll into the windows system folder
C:\Windows\SysWOW64
2. Go to the folder of your Visual Studio (may differ
based on your version)
C:\Program Files
(x86)\Microsoft Visual Stuido 10.0\VC\include (for VS 2010)
C:\Program Files
(x86)\Microsoft Visual Studio 12.0\VC\include (for VS 2013)
3. Create a new
folder named "GL" (without the quotes) in that folder above.
4. Now copy glut.h in the folder you just created.
5. Find the library folder at
C:\Program Files
(x86)\Microsoft Visual Studio 10.0\VC\lib (for VS 2010) or
C:\Program Files
(x86)\Microsoft Visual Studio 12.0\VC\lib (for VS 2013)
6. Copy glut32.lib into that folder.