Establish the glut programming environment under Visual Studio 08

Source: Internet
Author: User

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)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.