This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Calling Fortarn from C and I/O


>Is there a nice (easy) way to include the various fortran library calls for
>a fortran subroutine called from with a C program.  ie print, open, write?

Those are not yet available as "canned" routines as such in egcs-g77,
but rolling your own should not be too hard, in C, or even in Fortran.
Just make sure you try hard to make the interface code into a distinct,
portable layer -- that is, with a portable, Fortran-style interface,
even though the interface code itself would be nonportable (e.g. depend
on g77-specific features, though some of them, like %VAL, are pretty
widely supported in other compilers).

See the g77 docs for more information, including the information on
intrinsics that already *are* supported (like FGETC and FPUTC, IIRC)
and on "Debugging and Interfacing".

        tq vm, (burley)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]