VC++ project settings assuming that the glut related files are
already in the correct folders
VC6 Project
-
FILE -> New -> Project and create a new
Win32 Console Application
project. This allows you to have a console window and a graphics window (opened
using glut). Next you need to deal with the project settings.
-
To make sure that the appropriate OpenGL, GLU, and GLUT libraries are included
Project -> Settings -> link tab
-
Add opengl32.lib, glu32.lib, glut32.lib to the line labeled libraries
-
Make sure that you include GL/glut.h in your source file (or in a header
file which is included in the source file)
-
At the beginning you should have a project with no files. To add files to the
project you have several options
-
If it is an existing source file then Project -> Add files
-
File -> New click on the Files tab and select a C++ Source file. Edit the new file and add it to the project.
VC7 in .NET and .NET 2003 Project
-
FILE -> New -> Project, select Project Type Visual C++
Projects, select
Win32 Project (.NET) or
Win32 Console Project (.NET 2003) in the Templates pane. DO NOT FORGET to
enter the project Name. This allows you to have a console window and a graphics window (opened
using glut). Next you need to deal with the project settings.
Click OK. This starts the Win32 application Wizard, which
generates w Win32 application project.
-
In the Win32 application Wizard: Select Application Settings,
check Application type: Console Application and Additional
Options: Empty Project. Click Finish.
Now you are brought in the Solution Explorer. You can
add, modify, and remove source, header and resource files.
-
At the beginning you should have a project with no files. To add files to the
project you have several options.
You can add an existing/new source file by
- In the solution explorer right click Source Files, then Add files
->Existing/New Item.
- On the main toolbar Project->Add Existing/New Item.
As long as you have included GL\glut.h in your sources and
your OpenGL settings confirm to default you are ready to compile
and link by pressint the start button next to the Debug/Release
field in the Standard toolbar. To be doubly sure you may choose to inefrom explicitly the Linker where to find OpenGL and GLUT.
Setting up the Vc linker
You must open the Project Property Pages dialog. This can be done in
two ways.
- Project->Properties
- In the Solution Explorer, right click the project name, select
Properties in the menu
In the Project Property Pages
- In the Configuration list box select All Configurations
- In the left pane Linker->Input, then in the Additional
Dependencies text box in the right pane add openGL32.lib glu32.lib
glut32.lib
Last update: 09/13/05