MyTetra Share
Делитесь знаниями!
MinGW+OpenGL+GLUT "How-to-Install"
Время создания: 04.04.2011 22:14
Текстовые метки: MinGW, gcc, GLUT, OpenGL
Раздел: OpenGL
Запись: YellowRaven/myTetra_repo/master/base/0000000011/text.html на raw.github.com

MinGW+OpenGL+GLUT "How-to-Install"

This page gives a quick explanation of how to install MinGW and OpenGL so that programs that use OpenGL + GLUT can be compiled and run under Windows.

More information on the MinGW tools can be found here (http://www.mingw.org/).

Installing MinGW

  1. Make a directory "C:\mingw".
  2. Download the MinGW installer (http://web.cs.wpi.edu/~gogo/courses/mingw/MinGW-5.1.4.exe) to your "C:\mingw" directory and run it. Leave the selected items to install as is, and click "Next."
  3. Download the MSYS installer (http://web.cs.wpi.edu/~gogo/courses/mingw/MSYS-1.0.10.exe) to your "C:\mingw" directory and run it.
  4. If prompted, annswer "yes" to the finish-up script, and type in the path to MinGW ("C:/mingw") when prompted.
  5. Download MSYS DTK 1.0 (http://web.cs.wpi.edu/~gogo/courses/mingw/msysDTK-1.0.1.exe) to your "C:\msys\1.0" directory and run it.
  6. Download MSYS Core 1.0.11 (http://web.cs.wpi.edu/~gogo/courses/mingw/msysCORE-1.0.11-2007.01.19-1.zip) to your "C:\msys\1.0" directory, and unzip it there.
  7. Upon completion, there should be a new item on your desktop to launch the MSYS shell (it looks like an "M"). Double click it, and you should be at a nice, Unix-like shell, in your home directory "/home/<your login name>".
  8. You can now use your editor to create C++ files, save them under this directory somewhere, and then use "make" to compile them.
  9. Move on to the "installing GLUT" section below, if you need to.

Installing GLUT

  1. Download this GLUT archive (http://web.cs.wpi.edu/~gogo/courses/mingw/winglut.zip) to your "C:\mingw" directory.
  2. Unpack the archive, and place the "GL\glut.h" file in "C:\mingw\include\gl" directory, the "winlib\libglut32win.a" file into the "C:\mingw\lib" directory, and "glut32.dll" into the "C:\windows\system32" directory (or leave it in the same directory as your executable).
  3. When compiling, use #include <gl/glut.h> to include the glut header.
  4. When linking, use "-lglut32win" in the link line of your make file.
 
MyTetra Share v.0.59
Яндекс индекс цитирования