Installing GLUT in Windows Visual Studio 2010

I searched and searched and searched for some information on how to install this interface, and finally I found how to install the GLUT on Windows Visual Studio 2010 on Visual Ambitions site.

So, what you’ll need to do is head to Nate Robin’s GLUT page to get the *.dll, *.lib, and the *.h file that you’ll need to get started with the GLUT.

Once you download these files, you’ll need to relocate the files into their proper place.

To do this:

  1. Move glut.h into C:Program Files (x86)Microsoft Visual Studio 10.0VCincludeGL
  2. Move glut32.lib into C:Program Files (x86)Microsoft Visual Studio 10.0VClib
  3. Move glut32.dll into C:WindowsSystem32

That’s the easy part.

NOTE: 64bit machines, move glut32.dll into C:WindowsSysWOW64

Now:

  1. Open Visual Studio
  2. Select Empty Project (name it what you wish here)
  3. Select Project -> Properties -> Linker -> Input and
  4. add to Additional Dependencies the following: ;opengl32.lib;glu32.lib;glut32.lib; to the end (just before %(AdditionalDependencies) )

So, once this is done, you then have to create a property sheet, which you will then have to import every time you want to include the GLUT in your project. To do this:

  1. click view -> property manager
  2. Right click, select Add New Project Sheet (name it something you’ll remember, you’ll be adding it in the future ie. GLUT)
  3. Right click on the project sheet you just created
  4. select properties -> VC++ Directories -> Include Directories
  5. drop down the arrow, and select edit..
  6. browse to C:Program Files (x86)Microsoft Visual Studio 10.0VCincludeGL (or enter it in manually)

And that’s it!

As mentioned above, you’ll have to add this project sheet to each new project that you create.

If you don’t want this, Visual Ambition explains that you can edit the Microsoft.Cpp.Win32.user file that you see in the properties manager. I haven’t tested this though..

I did however find a few resources you may find useful with regards to the GLUT.

  1. GLUT The OpenGL Utility Toolkit
  2. Nate Robins GLUT for Win32 Files
  3. GLUT The OpenGL Utility Toolkit Programming Interface API Version 3 User Manual
  4. About Property Sheets
  5. Getting GLUT and GLUI for your own PC

3 Comments

  1. Biplob June 15, 2013 3:38 am  Reply

    when select empty project then showing error message. please solve argent.

    • ned June 18, 2013 7:35 am  Reply

      Biplob, you’re going to have to explain what’s happening a little bit more. What does the error message tell you?

Leave a Reply

six + seven =