On setting up GLUT in Microsoft VS 2008
On setting up GLUT in Microsoft VS 2008
This works on my office machine as well as the machines in CL112D
The following assumes that VS is installed in
C:\Program Files\Microsoft Visual Studio 9.0
Thanks to Jorge Diog for providing help on this
Glut files & directories
| file | location
|
|---|
| glut.dll | C:\Windows\System32
|
| glut.lib | C:\Program Files\Microsoft Visual Studio 9.0\VC\lib
|
| glut.h |
- C:\Program Files\Microsoft Visual Studio 9.0\VC\include
in which case you use #include <glut.h> or
- make a GL subdirectory, so:
C:\Program Files\Microsoft Visual Studio 9.0\VC\include\GL
in which case you use #include <GL\glut.h>
|
Creating the project
- make the project a Win32 Console Application
- go to application settings and
- make sure console application is selected and
- select empty project under Additional options
Pointing VS to the directories
go to tools->options
select VC++ Directories
under Platform, select Win32
- under Show directories for:, select includes
make sure '$(VCInstallDir)\include' is in the list
- under Show directories for:, select Library files
make sure '$(VCInstallDir)\lib' is in the list
$(VCInstallDir) is the directory where visual studio is installed, e.g.,
C:\Program Files\Microsoft Visual Studio 9.0, in this case
Notes
- in VS 2008, you only need #include <glut.h>,
you don't need #include <gl.h>
- you can build and run this on the C drive
you can build this on the Z drive (UNIX file system)
if you move the .exe over to the C drive, it will then run