Calling C from FORTRAN under Unix
Steve Emmerson
steve at groucho.ucar.edu
Tue May 21 12:42:51 AEST 1991
In <1991May20.232613.19802 at agate.berkeley.edu> jerry at violet.berkeley.edu
(Jerry Berkman;217E;24804;;ZA78) writes:
>By the way, fort is not the only compiler which doesn't use underscores.
>The Cray CFT77 compiler under UNICOS (Cray's version of UNIX) also converts
>the name to upper case and does not add any underscores. But neither
>do the Cray C compilers, so you can call the routine "ABC" in C and
>link successfully. I believe the IBM AIX Fortran and C compilers both
>just add a period in front of the name, i.e. ".abc".
That is correct (at least for the text segment). Another machine/compiler
combination that doesn't add an underscore is Next/Absoft.
The issue of Fortran-callable C functions can cause considerable problems
when attempting to write portable "jacket" interfaces to C libraries.
Steve Emmerson steve at unidata.ucar.edu ...!ncar!unidata!steve
More information about the Comp.unix.questions
mailing list