Reprint: http://www.cnblogs.com/live41/p/3368830.html
GLUT Library-Download channel-csdn.net
http://download.csdn.net/download/jingshuang/272930
What do you need?
To use the Glut Library development program, you can download the latest version of 3.7.6. You can glut the source code, or you can go directly down the Windows binaries (. H/.lib/.dll)
To use the GLUT library to develop C/D + + programs, the following three files are used:
Glut.h-This is the included header file that your program will use. Typically placed in the C:\Program Files\Microsoft Visual Studio 11.0\vc\include\gl\ directory.
Glut32.lib (Windows version)-this file is linked to your program and is guaranteed to be placed in the C:\Program Files\Microsoft Visual Studio 11.0\vc\lib\ directory.
Glut32.dll (Windows version)-can be placed in the same directory as the program's. exe file, or in the C:\Windows\System32 directory (if it is 64-bit Windows, put in the C:\Windows\SysWOW64 directory).
Configuring to Visual Studio 2010
Create a new C + + file with the Win32 console program (WIN32 console application), empty project, new project, and then you can start coding.
When you run the sample code for the next section, you'll find two windows, one for OpenGL, and one for the command Line window. The command-line window can be used to output some key information.
When you're familiar, you'll want to have a Relationship command-line window, which can be done in the following ways:
Project properties, Linker (Linker), subsystem (System), subsystems (SubSystem)
Set the value to WINDOWS (/subsystem:windows)
Project properties, Linker (Linker), command line
Add/entry:maincrtstartup to additional option (Additional options)
You want to tell vs where to find Glut's header files and library files.
Solution Properties-VC + + directory (VC + + Directories), respectively, fill in the path of include and Lib
User note for Legacy vs
VS2003 and 2005 sometimes report this error:
Error C2381: ' exit ': redefinition; __declspec (noreturn) differsc:\opengl\toolkits\includes\gl\glut.h (146): See Declaration of ' exit '
The reason is that # include <GL/glut.h> must be placed behind # include <stdlib.h>.
GLUT Tutorial-Installation