Running OpenGL on Visual Studio 2005
I’ve been learning OpenGL for a little while and I got sample codes to analyze sometimes. In some cases, I got errors like “Can not open file GLUT.h”, “Can not open file GLUT32.lib”..and stuff like this. First I thought I was because of the corruption of my VS libraries and wanna fix it up. After searching around, I realized that neither XP nor VS2005 come with Glut with them. And to save the world on this occasion, you have to do the following:
1. Get the newest version of GLUT here: GLUT 3.7.6 for Windows.
2.
| File | Location |
| glut32.dll | C:\WINDOWS\system\ (or system32) |
| glut32.lib | C:\Program Files\Microsoft Visual Studio 2005\VC\PlatformSDK\Lib |
| glut.h | C:\Program Files\Microsoft Visual Studio 2005\VC\PlatformSDK\Include\gl |
3. Make sure your Visual C++ project links in the GLUT/gl/glu libraries. This can be difficult to find. In Visual Studio 2003.NET, I think this is located in:
- Menu: “Project -> (your-project-name) Properties”
- Tab: “Configuration Properties -> Linker -> Input”
- Under “Additional Dependancies”, add “glut32.lib opengl32.lib glu32.lib”
** Sharing of programs that uses glut32 must includes glut32.dll also**
December 2, 2007 at 7:37 am
thank you for the speedy tutorial
January 26, 2008 at 7:22 am
Thanks for posting this quick tutorial.
May 13, 2009 at 4:48 am
Thank you very much! It’s very important info for me!
September 29, 2009 at 9:25 pm
Very useful, thanx
November 4, 2009 at 8:58 pm
Thanks a million ….
February 24, 2010 at 2:33 am
i am not able to see the total destination in step 2 for the library files
February 24, 2010 at 6:09 pm
@sravanti that would be
C:\Program Files\Microsoft Visual Studio 8\VC\include
March 15, 2010 at 7:31 pm
i am not able to get an option such as step 3…i have 2005 version can any one suggest me the right options pls…..
September 22, 2010 at 3:56 am
its working correctly…………
thanks
September 22, 2010 at 3:57 am
its working correctly thanks……………
November 28, 2010 at 8:05 pm
Thanks. It works for dummies too.
February 1, 2011 at 4:20 am
I do all of step but I get this error:
fatal error c1083:can not open include file ‘gl/glut.h’:no such file or directory
I used this header:
#include
#include
#include
#include
#include
please guide me.
February 2, 2011 at 4:50 pm
I need opengl code for visual c++ 2005.net