Installing GLUT on Visual Studio 2010
August 12, 2010 7 Comments
I decided to do this write up for both myself and others who might be installing GLUT in Visual Studio 2010. I’ll include pictures if anyone requests it, but I think this is fairly straight forward.
First thing to do would be to place all the files in their correct directories.
glut.h: ‘C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\GL\’
glut32.lib: ‘C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\lib\’
glut32.dll: ‘C:\Windows\System32\’
For 64-bit machines, you will want to do this.
glut32.dll: ‘C:\Windows\SysWOW64\’
Same pattern applies to freeglut and GLEW files with the header files in the GL folder, lib in the lib folder, and dll in the System32 (and SysWOW64) folder.
1. Under Visual C++, select Empty Project.
2. Go to Project -> Properties. Select Linker -> Input then add the following to the Additional Dependencies field:
opengl32.lib
glu32.lib
glut32.lib
NOTE: If you will be also installing GLEW be sure to place, “#include <GL/glew.h>”, before the include for GLUT. Also place “glewInit();” after your “glutCreateWindow”.
NOTE: This is where things differ a bit between Visual Studio 2010 and the previous versions. In the previous versions we would just add into the VC++ Directories, but they have since done away with this and replaced it with Property Sheets.
Go here to learn about Property Sheets.
This link discusses VC++ Directories in VS2010.
3. Go to View -> Property Manager.
4. Right click and Add New Project Property Sheet. I just named my new Project Property Sheet as ‘GLUT’ and so I will be referring to our Property Sheet as ‘GLUT’.
5. You should now see ‘GLUT’ under Microsoft.Cpp.Win32.user in both the Debug and Release section of the Property Manager.
6. Right-click ‘GLUT’ select Properties, then select VC++ Directories.
7. Select Include Directories and choose ‘Edit…’
8. Either enter this directory ‘C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\GL’ or browse to it.
9. Everything should work now! Please leave a comment if it worked or ran across any problems.
For future projects, you would need to select ‘Add Existing Project Sheet’ in the Project Manager in order to get GLUT working. You can also edit the Microsoft.Cpp.Win32.user sheet and add GLUT to the VC++ Directories, but then GLUT would be applied to every project you create.
Pingback: Installing GLUT in Windows Visual Studio 2010 « Application & Program Tips « Electronic Services
seems that ‘am pretty good at forgetting things. Thanks for your help on this..
dude that was awesome, thanks for this post and i would translate it to my language (Persian) and i will link it to your post ! thanks a lot!
Thanks!! This really helped out and I am glad you wrote something like this.
dude, I love you
I was in a class for computer graphics and the teacher is a DOUCHE and didnt give us any instructions on how to set up GLUT. -_- this saved my lifeeee D: ♥♥
Thanks so much!! This is the most useful guide I’ve found on this, no need to guess most steps as you’ve included everything. I wish all mini guidelines are like this.
=D =D =D =D
Pingback: Glut install | Inkinmyblood