问题
Can someone help me with a step by step tutorial on how to install GLUT on a Windows 7 64 bit system for MS VS2010?
回答1:
Your GLUT download will come with .h files, .lib files, and .dll files. Place the .h files in:
C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/GL
Note that the GL folder does not initially exist. You have to create it. You may name it something else if you want. When you include the GLUT header file in your project, you will just have to type:
#include <GL/glut.h>
Or whatever you named the folder you put glut.h in.
Next, you have to place the .lib files in the following path:
C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/lib
And when you create your project, make sure you add the .lib files to your Additional Dependencies (Linker->Input->Additional Dependencies).
Finally, put the .dll files in:
C:/Windows/SysWOW64
This is the folder where 32-bit .dlls are located. System32 contains the 64-bit .dlls. You can also put the GLUT .dlls in System32, if you want to feel safe.
And that's it!
Some people may suggest putting all these files directly into your project folder. You should probably not do this, because for every other project you create with GLUT, you will have to copy those files into it as well. The locations I have mentioned make them universally available to your applications.
回答2:
Here is a guide for vs 2008 with freeglut, VS 2010 is 90% the same.
"Start up the visual Studio environment. This is what was used for the following example but other versions should work the same. Once you start up Visual Studio 2008 the next thing to do is to create a new project using File->New->Project.
Choose the Win32 Console Application and set up your project.
Once you click okay, a second dialog will appear to configure the project. DO NOT click the Finish button. Click on the Next Button
This will bring up a second page in the application wizard. You need to turn off precompiled headers (I have periodically had problems with these being out of date) and select to start with an empty project.
Now, you will need to copy three files into your empty project. They are glut.h, glut32.lib, and glut32.dll. They may be obtained from the course web site. These should go into your project folder that you created in the previous step. Next you will need to add the glut.h and glut32b files .lias existing files to the project.
The system may ask if you want to set up compilation rules for the glut32.lib file – you should say no – the file is already compiled and should not need to be recompiled.
We will do is change your project configuration properties. Use the menu to go to Project->Properties. Under the properties go to Linker -> Command Line and add two libraries to the list: opengl32.lib glu32.lib"
来源:https://stackoverflow.com/questions/9234664/how-to-install-glut-on-a-64-bit-windows-7-for-ms-vs2010