Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!dgp.toronto.edu!flaps From: flaps@dgp.toronto.edu (Alan J Rosenthal) Newsgroups: comp.lang.c Subject: Re: Calling FORTRAN from C (Was: Ne Message-ID: <8905181540.AA06912@cartier.dgp.toronto.edu> Date: 18 May 89 15:40:35 GMT References: <176@csun1.UUCP> <7800008@gistdev> Organization: Dynamic Graphics Project, University of Toronto Lines: 16 In article <7800008@gistdev> flint@gistdev.UUCP writes: >An example: The main() routine is in C which calls Fortran routines which >in turn call C routines. Unfortunately, the Fortran parts use some string >functions ... >Can you just add a -lF77? Wrong, ... > >The end result is that if I want to do any output at all from the Fortran >code, I have to call a C routine to do it... Why not just have your main in Fortran? It could be just a call to cmain(). I think this solves this problem. Of course, it doesn't solve this problem when you are trying to compile with two non-C languages, but for just one it's fine. ajr