MinGW: Difference between revisions

From OpenGL Wiki
Jump to navigation Jump to search
m jimminy tweakits
Line 5: Line 5:
**For XP:    ControlPanel -> System -> Advanced -> EnvironmentVariables
**For XP:    ControlPanel -> System -> Advanced -> EnvironmentVariables
**For Vista: ControlPanel -> SystemAndMaintenance -> System -> AdvancedSystemSettings -> EnvironmentVariables
**For Vista: ControlPanel -> SystemAndMaintenance -> System -> AdvancedSystemSettings -> EnvironmentVariables
**The PATH variable should look something like  
**The PATH variable should look something like this:
  %SystemRoot%\system32;...;C:\MinGW\bin
  %SystemRoot%\system32;...<other paths>...;C:\MinGW\bin


==GLUT==
==GLUT==
Line 16: Line 16:


==Example GCC usage with GLUT and GLEE==
==Example GCC usage with GLUT and GLEE==
From the console, enter the following from within the source folder
From a system console, enter the following from within the source [http://www.opengl.org/resources/code/samples/redbook/hello.c] folder:
  g++ -o my.exe -Wall my.cpp glee.lib glut32.lib -lopengl32 -lglu32
  gcc -o hello.exe -Wall hello.c glee.lib glut32.lib -lopengl32 -lglu32
 
==External links==
*http://www.opengl.org/resources/code/samples/redbook/hello.c
*http://gcc.gnu.org/onlinedocs/

Revision as of 15:33, 2 July 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 this:
%SystemRoot%\system32;...<other paths>...;C:\MinGW\bin

GLUT

Example GCC usage with GLUT and GLEE

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

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

External links