• Articles
  • Installing and Configuring Visual C++ an
Published by
Sep 12, 2014

Installing and Configuring Visual C++ and GLUT

Score: 4.0/5 (92 votes)

Getting OpenGL to Work With Visual C++ 2010

Follow each step, unless you have already done one of these steps.

Install Visual C++ 2010 Express Edition

This is a free C++ IDE from Microsoft that is an excellent tool to start with, if you are interested in programming on a Windows environment.

You can find Visual C++ 2010 on the Visual Studio Express download page on Microsoft's site. It only works on Windows XP and up.

If the Directory C:\Program Files\Microsoft SDKs\Windows\v7.0A exists, go to the next step, otherwise you need to install the Windows SDK for Windows Server 2008 and .NET Framework 3.5

This is the equivalent to the Windows? Server 2003 SP1 Platform SDK that Visual C++ 2005 users installed. It contains the main OpenGL libraries. You can download the Windows SDK for Windows Server 2008 and .NET Framework from the Microsoft website.

The installation will take a little while.

Install the GLUT Libraries

These are additional libraries that come in handy down the road. Some code samples you find may use them, so I find it best to just have them around right off the bat. I downloaded the original GLUT from Nate Robins' site.

After downloading, unzip them and do the following:

1. Copy the glut.h file into the C:\Program Files\Microsoft SDKs\Windows\v7.0A\Include\GL folder.

2. Copy the glut32.lib file into the C:\Program Files\Microsoft SDKs\Windows\v7.0A\Lib folder.

3. Copy the glut32.dll files into the C:\Windows\system32 folder.

Create Your First Project

Create a project in Visual C++ with File -> New -> Project, choose a folder and a name for the project and set the template as Win32 Project. Click OK.

Click Next on the following screen and you will be taken to Application Settings. Check Console Application and on Empty Project and then click OK. Your new project has been created.

Declare the dependencies for your project.

1. Click on Project -> [project name] Properties.

2. Expand Configuration Properties.

3. In the Configuration dropdown, select All Configurations.

4. Select Linker -> Input.

5. In the Additional Dependencies field, enter in glu32.Lib OpenGL32.Lib glut32.lib. Then click OK.

Create Your First Source File

Go to File -> New -> File Choose Visual C++ and then C++ file. Enter your code in the source file, remember to add the line:

#include "GL/glut.h"

At the beginning of your file to include the GLUT header file.

After you finished creating the file, Press F7 (or go to Debug -> Build Solution) to compile it and F5 (Debug -> Start Debugging) to run it.

It should be working at this point.
  • <nobr id="pwjBlLZ"><bdo id="pwjBlLZ"></bdo></nobr>
  • <bdo id="pwjBlLZ"><delect id="pwjBlLZ"></delect></bdo>
  • <bdo id="pwjBlLZ"><delect id="pwjBlLZ"></delect></bdo>
  • <dfn id="pwjBlLZ"></dfn>
  • <dfn id="pwjBlLZ"><delect id="pwjBlLZ"></delect></dfn>
  • <bdo id="pwjBlLZ"></bdo>
  • <bdo id="pwjBlLZ"><delect id="pwjBlLZ"></delect></bdo><dfn id="pwjBlLZ"><delect id="pwjBlLZ"><strike id="pwjBlLZ"></strike></delect></dfn><bdo id="pwjBlLZ"></bdo>
  • <bdo id="pwjBlLZ"></bdo><dfn id="pwjBlLZ"></dfn>
  • <dfn id="pwjBlLZ"></dfn>
  • <dfn id="pwjBlLZ"><delect id="pwjBlLZ"></delect></dfn>
  • <bdo id="pwjBlLZ"></bdo>
  • <dfn id="pwjBlLZ"></dfn>
  • <bdo id="pwjBlLZ"><delect id="pwjBlLZ"></delect></bdo>
  • 6478461606 2018-02-24
  • 4985791605 2018-02-24
  • 5637141604 2018-02-24
  • 282181603 2018-02-24
  • 6217941602 2018-02-24
  • 5076141601 2018-02-24
  • 714281600 2018-02-24
  • 6607141599 2018-02-24
  • 949041598 2018-02-24
  • 6809961597 2018-02-24
  • 671871596 2018-02-24
  • 7107821595 2018-02-24
  • 9407391594 2018-02-24
  • 6234261593 2018-02-24
  • 1793521592 2018-02-23
  • 2864591591 2018-02-23
  • 6167231590 2018-02-23
  • 3669201589 2018-02-23
  • 7946381588 2018-02-23
  • 8957701587 2018-02-23