How to call a fortran subroutine in a C program?

der Mouse mouse at thunder.mcrcim.mcgill.edu
Wed Mar 27 20:12:51 AEST 1991


In article <2774 at pacific.mps.ohio-state.edu>, sun at pacific.mps.ohio-state.edu (Mingqiu Sun) writes:
> This question is probably asked before.

Yup :-)

> Is there an easy way to call a subroutine written in fortran by a C
> program?

Maybe.  This is entirely dependent on your compiler and system.  Some
make it trivial, some make it impossible, and I'm sure there are many
variations in between.

> I need only to know how to do it in a UNIX environment.

Most UNIX environments with FORTRAN (an environment without C can
hardly be called UNIX) provide some way to interface between C an
FORTRAN.  Check your FORTRAN manual; that's usually the place to find
such information.

					der Mouse

			old: mcgill-vision!mouse
			new: mouse at larry.mcrcim.mcgill.edu



More information about the Comp.lang.c mailing list