Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 7 of 7

Thread: can't find glut.h?

  1. #1
    Junior Member Newbie
    Join Date
    Mar 2004
    Location
    Vancouver, Canada
    Posts
    21

    can't find glut.h?

    using fedora core 1

    glut 3.7-8 installed

    trying to compile some trival opengl code

    the only include is glut.h

    gcc -o test simple.c -L/usr/include/GL lglut

    when I run this I get a "glut.h:no such file or directory"

    thanks from a noob

  2. #2
    Intern Newbie
    Join Date
    Apr 2002
    Location
    Split, Croatia
    Posts
    43

    Re: can't find glut.h?

    Maybe glut.h is not in standard include directory, usually ../include/GL (you should include it like this #include <GL/glut.h>). Try searching file system for it, and if it finds it in other dir than include/GL just use -I command line option for gcc.
    Hope this helps.

  3. #3
    Senior Member OpenGL Guru
    Join Date
    Jun 2000
    Location
    Gastonia, NC, USA
    Posts
    2,096

    Re: can't find glut.h?

    I don't do much in the way of command line stuff, I use Kdevelope under fedora, it takes care of all that stuff.

    But I think you have your command line set wrong.

    Should it not be more like this"
    gcc -o test simple.c -I/usr/lib/include -L/usr/lib -lglut

    -L = Library directory
    -l = library file to use

    -I = Include directory

    Originally posted by not_yet:
    using fedora core 1

    glut 3.7-8 installed

    trying to compile some trival opengl code

    the only include is glut.h

    gcc -o test simple.c -L/usr/include/GL lglut

    when I run this I get a "glut.h:no such file or directory"

    thanks from a noob

  4. #4
    Junior Member Newbie
    Join Date
    Mar 2004
    Location
    Vancouver, Canada
    Posts
    21

    Re: can't find glut.h?

    thanks

    this is off topic

    but, having never used kdevelope,

    where in kdevelope do you set it to point to the library / include files needed to compile opengl

    cheers

  5. #5
    Senior Member OpenGL Guru
    Join Date
    Jun 2000
    Location
    Gastonia, NC, USA
    Posts
    2,096

    Re: can't find glut.h?

    Kdevelope set's all the library/include directorys for you, you just tell it what librarys to include in your project.

    If you are using glut, just create a C/C++ project. Then under project options, linker settings add: -lGL -lGLU -lglut

    Originally posted by not_yet:
    thanks

    this is off topic

    but, having never used kdevelope,

    where in kdevelope do you set it to point to the library / include files needed to compile opengl

    cheers

  6. #6
    Senior Member OpenGL Guru
    Join Date
    Jun 2000
    Location
    Gastonia, NC, USA
    Posts
    2,096

    Re: can't find glut.h?

    Hi,

    Just got glut-3.7-8 to install over the buggy 3.7-12.

    My glut examples compiled fine, under kdevelope.

    Here is what I have done:

    Installed Fedora.
    Installed the runtime and development files, glut-3.7-8.rpm and glut-devel-3.7-8.rpm. Note I rebuilt the glut-3.7-8 from the src rpm.
    if you had the newer glut build files installed, you can over write them with rpm --install --oldpackage --force glut-3.7-8.rpm

    I did not have to install any onther openGL librarys, or support files other then glut.

    Also have setup SDL on fedora and had succesful compiles.

    Originally posted by not_yet:
    thanks

    this is off topic

    but, having never used kdevelope,

    where in kdevelope do you set it to point to the library / include files needed to compile opengl

    cheers

  7. #7
    Junior Member Newbie
    Join Date
    Mar 2004
    Location
    Vancouver, Canada
    Posts
    21

    Re: can't find glut.h?

    thanks nexusone

    not_yet

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •