MinGW: Difference between revisions

From OpenGL Wiki
Jump to navigation Jump to search
m jimminy tweakits
m jimminy tweakits
Line 1: Line 1:
==MinGW==
==MinGW==
*Download and install all packages from http://www.mingw.org/
*Download and install all packages [http://www.mingw.org/]
**MinGW-x.x.x.exe will automate the download and installation process for you
**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  
*Add the MinGW\bin path to the Windows PATH environment variable  
**For XP:    ControlPanel -> System -> Advanced -> EnvironmentVariables
**For XP:    ControlPanel -> System -> Advanced -> EnvironmentVariables
Line 9: Line 9:


==GLUT==
==GLUT==
*Download the Win32 header and binaries from http://www.xmission.com/~nate/glut.html
*Download the Win32 header and binaries [http://www.xmission.com/~nate/glut.html]
**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\GL)
*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)
Line 20: Line 19:


==External links==
==External links==
*http://www.mingw.org/
**http://gcc.gnu.org/onlinedocs/
*http://www.xmission.com/~nate/glut.html
**http://www.xmission.com/~nate/glut/glut-3.7.6-bin.zip
*http://www.elf-stone.com/glee.php
*http://glew.sourceforge.net/
*http://www.opengl.org/resources/code/samples/redbook/hello.c
*http://www.opengl.org/resources/code/samples/redbook/hello.c
*http://gcc.gnu.org/onlinedocs/

Revision as of 15:41, 2 July 2009

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