This is for Visual Studio 2010, although this will apply for almost any version of Visual Studio.
- You will need to download the glut library from here http://www.xmission.com/~nate/glut/glut-3.7.6-bin.zip
- If you are using Windows 7, add glut.dll to C:\Windows\sysWOW64.
- If you are using Windows XP, add glut.dll to C:\Windows\system
- Add glut.h to C:\Program files(x86)\Visual Studio 10.0\VC\include\gl
You might need to make a gl folder if one doesn’t exist.
- Add glut.lib to C:\Program Files(x86)\Visual Studio 10.0\VC\lib
- Now create a simple visual c++ console application
- Right click on solution name where it appears on the right hand side of the screen
- Click properties and in the configuration list, select all configurations
- Click on linker and in the additional dependencies list add the following: glut.lib
- Now create a code file for the project by pressing ctrl+shift+a and select a c++ file
- #include gl.h,glu.h and glut.h
- And before all these includes, #include<windows.h>
- Write any code you want.