View Full Version : g77 -> OpenGL
I need to access GL from fortran :=( .
I have the header fglut.h but not the
matching library file(s)
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)
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.
03-07-2003, 11:29 AM
The documentation says GLUT has fortran bindings, although I've never used them.
This should be of interest:
Basically you want to link to fglut, not glut.
You may need the glut source to build this.
03-14-2003, 06:11 PM
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
So far I can compile, link and execute
a small routine.
Anyone interested can email me for
the files at firstname.lastname@example.org
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.