MinGW

From OpenGL Wiki
Revision as of 15:41, 2 July 2009 by Brolingstanz (talk | contribs) (jimminy tweakits)
Jump to navigation Jump to search

MinGW

  • Download and install all packages [1]
    • MinGW-x.y.z.exe will automate the download and installation process for you
  • Add the MinGW\bin path to the Windows PATH environment variable
    • For XP: ControlPanel -> System -> Advanced -> EnvironmentVariables
    • For Vista: ControlPanel -> SystemAndMaintenance -> System -> AdvancedSystemSettings -> EnvironmentVariables
    • The PATH variable should look something like this:
%SystemRoot%\system32;...<other paths>...;C:\MinGW\bin

GLUT

  • Download the Win32 header and binaries [2]
  • Add glut.h (glee.h, glew.h, etc.) to the MinGW include forlder (e.g., C:\MinGW\Include\GL)
  • Add glut32.dll to C:\Windows\System32 (or your executable's folder)
  • Add glut32.lib (glee.lib, glew.lib, etc.) to your project's source folder

Example GCC usage with GLUT and GLEE

From a system console, enter the following from within the source [3] folder:

gcc -o hello.exe -Wall hello.c glee.lib glut32.lib -lopengl32 -lglu32

External links