How To Install Glut File

You might also like

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 2

**************** GLUT Installation **************** GLUT files can be found at http://www.xmission.com/~nate/glut.

html **************** GLUT under Visual Studio (Windows) **************** You need OpenGL, GLU, and GLUT. Luckily the OpenGL and GLU libraries come with W98/NT/2K/XP, so all you need is to install GLUT . GLUT files can be found at http://www.xmission.com/~nate/glut.html The zip file contains dll, lib, and the header files you need. After unzipping them put them as follows (for Visual Studio 9): glut32.dll in C:\WINDOWS\SYSTEM32 (WXP) glut32.lib in C:\Program Files\Microsoft Visual Studio 9\VC\lib glut.h in C:\Program Files\Microsoft Visual Studio 9\VC\include\GL Note: depending upon the version of Visual Studio you are using the above directories may have a slightly different name. **************** GLUT under Dev-C++ (Windows) **************** There are two ways as far as I know: 1. install Dev-C++ 2. use its package updater and grab the 'glut' package 3. add Dev-C++'s \bin directory to your system PATH 4. compile with: gcc <sourcefile> -lglut32 -lglu32 -lopengl32 -lwinmm -lgdi32 And of course you can directly use Dev-C++ to compile your GLUT files instead of the command prompt. alternatively... You can use MinGW. Don't forget to add its \bin directory to your system PATH so you can invoke the compiler anywhere in your system, just like in the first method above. Before you can compile GLUT, you will need to put the relevant files into MinGW's directories. Put the GLUT files, found at http://www.xmission.com/~nate/glut.html in the following locations: glut.h --> <yourMinGW>\include\GL glut32.lib --> <yourMinGW>\lib glut32.dll --> <yourWindows>\system or \system32 You will also need to delete libglut32.a included by MinGW in it's \lib directory as it is outdated and incompatible with the the GLUT package. If you dont delete the file it will be used in preference to glut32.lib and you will get compilation errors. In your source files, add #include <windows.h> before #include <glut.h> ***************************** GLUT under Mac OS X ************************ If you install the Developer Tools (compilers etc) that came on the CD with your Mac, it will install the OpenGL and GLUT frameworks.

***************************** GLUT under Linux/gcc ************************ Depending upon which variant you have installed, getting glut to work has been known to be as simple as follows, e.g. for getting lab1 demo to work - Change the location of the glut headers in main.c: #include "/usr/include/GL/glut.h" - and then compiled with: gcc -lglut Main.c Timer.c

You might also like