Calling FORTRAN from C (Was: Ne
Alan J Rosenthal
flaps at dgp.toronto.edu
Fri May 19 01:40:35 AEST 1989
In article <7800008 at gistdev> flint at 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
More information about the Comp.lang.c
mailing list