MinGW: Difference between revisions

From OpenGL Wiki
Jump to navigation Jump to search
m New page: ==MinGW== *Download and install all packages from http://www.mingw.org/ **MinGW-x.x.x.exe will automate the download and installation process for you. *Add the MinGW\bin path to the Window...
 
mNo edit summary
Line 11: Line 11:
*Download the Win32 header and binaries from http://www.xmission.com/~nate/glut.html
*Download the Win32 header and binaries from http://www.xmission.com/~nate/glut.html
**http://www.xmission.com/~nate/glut/glut-3.7.6-bin.zip (old but good)
**http://www.xmission.com/~nate/glut/glut-3.7.6-bin.zip (old but good)
*Add glut.h (glee.h, glew.h, etc.) to the MinGW include forlder (e.g., C:\MinGW\Include)
*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.dll to C:\Windows\System32 (or your executable's folder)
*Add glut32.lib (glee.lib, glew.lib, etc.) to your project's source folder
*Add glut32.lib (glee.lib, glew.lib, etc.) to your project's source folder

Revision as of 23:32, 26 April 2009

MinGW

  • Download and install all packages from http://www.mingw.org/
    • MinGW-x.x.x.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
%SystemRoot%\system32;...;C:\MinGW\bin

GLUT

Example GCC usage with GLUT and GLEE

From the console, enter the following from within the source folder

gcc -o my.exe -Wall my.cpp glee.lib glut32.lib -lopengl32 -lglu32