Results 1 to 3 of 3

Thread: error:can not open GL\glut.h

  1. #1
    Junior Member Newbie
    Join Date
    Mar 2001
    Posts
    1

    error:can not open GL\glut.h

    It's my first time I use OpenGL today, I downloaded some sample code from the website and try to run it then got the above error. My OS is windowsME, I have linked the 3 .lib files from visual sutio\lib to my project. and I'm sure the glut.h file is there under GL. Could anyboday help me on this?
    thanks in advance for your help, i really want to make it work.

  2. #2
    Senior Member Regular Contributor
    Join Date
    May 2001
    Location
    London UK
    Posts
    195

    Re: error:can not open GL\glut.h

    Right, the hglut.h should be in a directory called GL in your include directory. Check that it looks OK in the editor.

    I am not using MSVC but most compilers lets you change the default for the include dir. Check this also.

  3. #3
    Member Newbie
    Join Date
    Mar 2001
    Location
    Brest
    Posts
    39

    Re: error:can not open GL\glut.h

    Hi.

    Go in Visual C++ directory. Copy glut.h (others: glu.h, gl.g, glaux.h, glui.h,......) in the directory:
    .\includes\GL\
    For lib (gl.lib, glu.lib, glut.lib) , look at:
    .\lib\

    Visual C++, in Setting Project, You must add librairies name in 'link' ,else VC doesn't want to link classes.

    Now, in your first program, write:

    #include <GL\gl.h>
    #include <GL\glu.h>
    #include <GL\glut.h>


    That's all.

Similar Threads

  1. fatal error C1083: Cannot open include file: 'glut
    By Lvl80retpaladin in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 01-15-2010, 07:58 PM
  2. GLUT: Fatal Error in (unamed): could not open display:
    By in forum OpenGL: User Software
    Replies: 3
    Last Post: 01-14-2005, 10:53 AM
  3. error "cannot open 'GL/glut.h'
    By in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 09-22-2002, 07:47 AM
  4. Replies: 0
    Last Post: 08-20-2002, 09:16 PM
  5. Open GL Error
    By phunq in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 01-14-2001, 07:27 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean