1. Visual C + + 2008
I installed Visual Studio 2008 (9.0) expression_r_r_r edition.
First download the glut package from the http://www.opengl.org/resources/libraries/glut/glutdlls37beta.zip
(1) Unpack the downloaded package and obtain 5 files.
(2) Place the glut. h In the C:/program files/Microsoft sdks/Windows/v6.0a/include/GL folder.
(3) Place the extracted glu32.lib in the C:/program files/Microsoft sdks/Windows/v6.0a/lib folder.
(4) Place the extracted glut. dll and glu32.dll In the System32 folder under the operating system directory.
Run visual c ++ 2008, file-> new project to create an empty Win32 console appliction. Right-click Solution Explorer on the right and choose source files from the shortcut menu, select Add-> new item ..., select C ++ file (. CPP)
Enter the following code in the new file to test
# Include <Gl/glut. h>
# Include <iostream>
Int main (INT argc, char * argv [])
{
Gluinit (& argc, argv );
Glable (gl_lighting );
Return 0;
}
Compilation is okay.
(Note that visual C ++ 2008 and 2005 are quite different. Their GL and Lib folders are not in the Microsoft Visual Studio 2008 installation folder of visuao C ++ 9.0, in the Microsoft sdks folder in the same directory as Microsoft Visual Studio 9.0, for Visual Studio 2005 .... VC/platformsdk/include and... in VC/platformsdk/lib, for vc6.0 in C:/program files/Microsoft Visual Studio/vc98)