Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

How to install FreeGLUT for Visual Studio 2012

📅 2013-Apr-28 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ freeglut, opengl, visual studio ⬩ 📚 Archive

FreeGLUT is an open-source library implementation of GLUT. These steps helped me install and use FreeGLUT with both Visual Studio 2012 and Visual Studio Express 2012 for Windows Desktop:

  1. Download a stable release of FreeGLUT from its webpage.

  2. Unzip the downloaded FreeGLUT file to a directory. Inside it, go to VisualStudio\2012 directory and open the freeglut.sln Visual Studio solution file. It opens in Visual Studio.

  3. In the toolbar, choose the Solution Configuration as Release. In Solution Explorer, right-click on the freeglut project and choose Build. It should build successfully.

  4. Create a new directory named GL in C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include Copy all the header files in include\GL of FreeGLUT to this new directory.

  5. Copy freeglut.lib from lib\x86 to C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\lib

  6. You want to use FreeGLUT to create OpenGL programs. After you build an OpenGL program, copy freeglut.dll from lib\x86 to the directory that contains the exe file of this OpenGL program. Your program should now execute successfully.

Tried with: FreeGLUT 2.8.1, Visual Studio 2012, Visual Studio 2012 for Windows Desktop and Windows 8 x64


© 2022 Ashwin Nanjappa • All writing under CC BY-SA license • 🐘 @codeyarns@hachyderm.io📧