OpenGL Program Compiling Instruction - VC++
Tools: Visual C++, GLUT
GLUT 3.7.6 should be downloaded here. glut-3.7.6-bin.zip includes everything to get started programming with GLUT. It includes glut32.dll, glut32.lib, glut.h which will be used in your compiling and running.
Installing GLUT 3.7 on your PC
- Find where the OpenGL32.dll is installed on your computer. It is generally at: C:\Windows\System32 OR (C:\Windows\SysWOW64 for 64-bit)
- Copy glut32.dll to the above directory, you may need to have administrator's privilege
- Copy glut.h into Microsoft Visual Studio 2010 include folder located at:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include for Windows 64-bit
C:\Program Files\Microsoft Visual Studio 10.0\VC\include for Windows 32-bit
- Copy glut32.lib into Microsoft Visual Studio 2010 lib folder located at
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\lib for Windows 64-bit
C:\Program Files\Microsoft Visual Studio 10.0\VC\lib for Windows 32-bit
- Click "Start" button and start Microsoft Visual Studio
- Create a new "Win32 Console Application". Make sure to check the option "Empty Project"
- Download Example1.cpp and place it in the project folder created by Visual Studio
- Compile and Run your program