G77 -> OpenGL

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

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) …

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_

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.

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

This should be of interest:
http://www.opengl.org/developers/documentation/glut/spec3/node91.html

Basically you want to link to fglut, not glut.

You may need the glut source to build this.

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

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.