Xref: utzoo comp.lang.c:39399 comp.lang.fortran:5433 comp.unix.questions:31502 Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!cs.utexas.edu!asuvax!ncar!groucho!steve From: steve@groucho.ucar.edu (Steve Emmerson) Newsgroups: comp.lang.c,comp.lang.fortran,comp.unix.questions Subject: Re: Calling C from FORTRAN under Unix Message-ID: <11484@ncar.ucar.edu> Date: 21 May 91 02:42:51 GMT References: <1991May20.232613.19802@agate.berkeley.edu> Sender: news@ncar.ucar.edu Followup-To: comp.lang.c Organization: University Corporation for Atmospheric Research (UCAR) Lines: 17 In <1991May20.232613.19802@agate.berkeley.edu> jerry@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@unidata.ucar.edu ...!ncar!unidata!steve