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 6 of 6

Thread: g77 -> OpenGL

  1. #1
    Guest

    g77 -> OpenGL

    I need to access GL from fortran :=( .
    I have the header fglut.h but not the
    matching library file(s)
    Thanks
    Pat

  2. #2
    Member Regular Contributor
    Join Date
    Apr 2001
    Location
    Greece
    Posts
    496

    Re: g77 -> OpenGL

    I think the libraries should be the same as for C.After all g77 just makes the object code wich is linked against the libs by gcc,right?If the compiler(rather linker) can't find the libs try finding where they are(the libGL.* files) and adding the file to the linker command line like this: gcc -L/usr/X11R6/lib/GL(or whatever the path is) ...

  3. #3
    Guest

    Re: g77 -> OpenGL

    The problem is in linking - it
    compiles fine but when I link,
    it can't find
    glutinit_ and glutnull_ .
    (I'm linking with
    -lglut -lGL -lGLU -L /usr/X11R6/lib -lGLx
    all the gl type libraries I can find)

    error message
    /tmp/ccGukEzD.o (.text+0x7):
    undefined reference to glutinit_

  4. #4
    Member Regular Contributor
    Join Date
    Apr 2001
    Location
    Greece
    Posts
    496

    Re: g77 -> OpenGL

    Well I can't find glutinit_ in libglut.so.3.7 either.Maybe you need special libs for fortran?Is there a fortran binding for glut?If so check the docs.

  5. #5
    Super Moderator OpenGL Guru dorbie's Avatar
    Join Date
    Jul 2000
    Location
    Bay Area, CA, USA
    Posts
    4,388

    Re: g77 -> OpenGL

    The documentation says GLUT has fortran bindings, although I've never used them.

    This should be of interest:
    http://www.opengl.org/developers/doc...c3/node91.html

    Basically you want to link to fglut, not glut.

    You may need the glut source to build this.

  6. #6
    Junior Member Newbie
    Join Date
    Mar 2003
    Location
    Phoenix, AZ, USA
    Posts
    1

    Re: g77 -> OpenGL

    I've been making progress in getting
    g77 to work with OpenGL.
    I found these glue routines on the web
    and I selected the appropriate bindings
    for g77. These files are fgl.c fglu.c and
    fglut.c.
    So far I can compile, link and execute
    a small routine.
    Anyone interested can email me for
    the files at emtomas@att.net

Posting Permissions

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