how to install glut file

Upload: sushil-rana-magar

Post on 05-Apr-2018

224 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/2/2019 How to Install Glut File

    1/2

    ****************GLUTInstallation****************

    GLUTfilescanbefoundathttp://www.xmission.com/~nate/glut.html

    ****************GLUTunderVisualStudio(Windows)****************

    YouneedOpenGL,GLU,andGLUT.LuckilytheOpenGLandGLUlibrariescomewithW98/NT/2K/XP,soallyouneedistoinstallGLUT.

    GLUTfilescanbefoundathttp://www.xmission.com/~nate/glut.htmlThezipfilecontainsdll,lib,andtheheaderfilesyouneed.

    Afterunzippingthemputthemasfollows(forVisualStudio9):

    glut32.dllinC:\WINDOWS\SYSTEM32(WXP)glut32.libinC:\ProgramFiles\MicrosoftVisualStudio9\VC\libglut.hinC:\ProgramFiles\MicrosoftVisualStudio9\VC\include\GL

    Note:dependingupontheversionofVisualStudioyouareusingtheabovedirectoriesmayhaveaslightlydifferentname.

    ****************GLUTunderDev-C++(Windows)****************

    TherearetwowaysasfarasIknow:

    1.installDev-C++2.useitspackageupdaterandgrabthe'glut'package3.addDev-C++'s\bindirectorytoyoursystemPATH4.compilewith:

    gcc-lglut32-lglu32-lopengl32-lwinmm-lgdi32

    AndofcourseyoucandirectlyuseDev-C++tocompileyourGLUTfilesinsteadofthecommandprompt.

    alternatively...

    YoucanuseMinGW.Don'tforgettoaddits\bindirectorytoyoursystemPATHsoyoucaninvokethecompileranywhereinyoursystem,justlikeinthefirstmethodabove.

    BeforeyoucancompileGLUT,youwillneedtoputtherelevantfilesintoMinGW'sdirectories.PuttheGLUTfiles,foundathttp://www.xmission.com/~nate/glut.htmlinthefollowinglocations:

    glut.h-->\include\GLglut32.lib-->\libglut32.dll-->\systemor\system32

    Youwillalsoneedtodeletelibglut32.aincludedbyMinGWinit's\lib

    directoryasitisoutdatedandincompatiblewiththetheGLUTpackage.Ifyoudontdeletethefileitwillbeusedinpreferencetoglut32.libandyouwillgetcompilationerrors.

    Inyoursourcefiles,add#includebefore#include

    *****************************GLUTunderMacOSX************************

    IfyouinstalltheDeveloperTools(compilersetc)thatcameontheCDwithyourMac,itwillinstalltheOpenGLandGLUTframeworks.

  • 8/2/2019 How to Install Glut File

    2/2

    *****************************GLUTunderLinux/gcc************************

    Dependinguponwhichvariantyouhaveinstalled,gettinggluttoworkhasbeenknowntobeassimpleasfollows,e.g.forgettinglab1demotowork

    -Changethelocationoftheglutheadersinmain.c:#include"/usr/include/GL/glut.h"

    -andthencompiledwith:gcc-lglutMain.cTimer.c