MinGW: Difference between revisions

From OpenGL Wiki
Jump to navigation Jump to search
m jimminy tweakits
mNo edit summary
Line 1: Line 1:
==MinGW==
==MinGW installation==
*Download and install all packages [http://www.mingw.org/]
*Download and install all packages [http://www.mingw.org/]
**MinGW-x.y.z.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 full "MinGW\bin" path to the Windows PATH environment variable  
**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
Line 8: Line 8:
  %SystemRoot%\system32;...<other paths>...;C:\MinGW\bin
  %SystemRoot%\system32;...<other paths>...;C:\MinGW\bin


==GLUT==
==GLUT installation==
*Download the Win32 header and binaries [http://www.xmission.com/~nate/glut.html]
*Download the Win32 header and binaries [http://www.xmission.com/~nate/glut/glut-3.7.6-bin.zip]
*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 folder (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
*See the [[Getting_started|Getting Started]] section for kick start on the configuration and use of GLee [http://www.elf-stone.com/glee.php] and GLEW [http://glew.sourceforge.net/]


==Example GCC usage with GLUT and GLEE==
==Example GCC usage with GLUT and GLee==
From a system console, enter the following from within the source [http://www.opengl.org/resources/code/samples/redbook/hello.c] folder:
From a system console, enter the following from within the source [http://www.opengl.org/resources/code/samples/redbook/hello.c] folder:
  gcc -o hello.exe -Wall hello.c glee.lib glut32.lib -lopengl32 -lglu32
  gcc -o hello.exe -Wall hello.c glee.lib glut32.lib -lopengl32 -lglu32
Line 20: Line 21:
==External links==
==External links==
*http://www.mingw.org/
*http://www.mingw.org/
**http://gcc.gnu.org/onlinedocs/
*http://gcc.gnu.org/onlinedocs/
*http://www.xmission.com/~nate/glut.html
*http://www.xmission.com/~nate/glut.html
**http://www.xmission.com/~nate/glut/glut-3.7.6-bin.zip
**http://www.xmission.com/~nate/glut/glut-3.7.6-bin.zip
*http://www.elf-stone.com/glee.php
*http://www.elf-stone.com/glee.php
*http://glew.sourceforge.net/
*http://glew.sourceforge.net/
*http://www.opengl.org/resources/code/samples/redbook/hello.c
*http://www.opengl.org/resources/code/samples/redbook/
**http://www.opengl.org/resources/code/samples/redbook/hello.c

Revision as of 16:37, 2 July 2009

MinGW installation

  • Download and install all packages [1]
    • MinGW-x.y.z.exe will automate the download and installation process for you
  • Add the full "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 installation

  • Download the Win32 header and binaries [2]
  • Add glut.h (glee.h, glew.h, etc.) to the MinGW include folder (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
  • See the Getting Started section for kick start on the configuration and use of GLee [3] and GLEW [4]

Example GCC usage with GLUT and GLee

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

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

External links