OpenGL Program Compiling Instruction - VC++

Environment

OS: Windows
Tools: Visual C++, GLUT

Before Starting

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

  1. Find where the OpenGL32.dll is installed on your computer. It is generally at: C:\Windows\System32 OR (C:\Windows\SysWOW64 for 64-bit)
  2. Copy glut32.dll to the above directory, you may need to have administrator's privilege
  3. 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
  4. 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

Compiling Instructions

  1. Click "Start" button and start Microsoft Visual Studio
  2. Create a new "Win32 Console Application". Make sure to check the option "Empty Project"
  3. Download example1.cpp and place it in the project folder created by Visual Studio
  4. Compile and Run your program