Notes About Installing OpenGL and GLUT
(Much of this page is borrowed from Lew Hitchner of Cal Poly State Univ. and Steve Cunningham of California State Univ. Stanislaus)
Further notes on Installing and Using OpenGL and
GLUT on Windows with Visual Studio suite
Building an OpenGL/GLUT program with Visual C++
1. Access Angel's code examples from book's CD or from his website directly: ftp://ftp.cs.unm.edu/pub/angel/BOOK/THIRD_EDITION/
Project->Settings. Select "Link" tab. In the Object\libraries field, type either of these:For Microsoft's OpenGL: opengl32.lib glu32.lib glut32.libFor SGI's OpenGL: opengl.lib glu.lib glut.lib
Note 1: 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 ).
#pragma comment (lib, "opengl32.lib") /* link with Microsoft OpenGL lib */#pragma comment (lib, "glu32.lib") /* link with OpenGL Utility lib */#pragma comment (lib, "glut32.lib") /* link with Win32 GLUT lib */
#pragma comment (lib, "opengl.lib") /* link with SGIís OpenGL lib */#pragma comment (lib, "glu.lib") /* link with SGIís OpenGL Utility lib */#pragma comment (lib, "glut.lib") /* link with SGIís Win32 GLUT lib */
Note 3: Getting rid of the console window.
/subsystem:console (it's one of the last lines)
/subsystem:windows /entry:mainCRTStartup