pro64-support
[Top] [All Lists]

Re: C-Fortran programs interface

To: "'pro64-support@xxxxxxxxxxx'" <pro64-support@xxxxxxxxxxx>, "Kakulavarapu, Prasad" <prasad.kakulavarapu@xxxxxxxxx>
Subject: Re: C-Fortran programs interface
From: lesniak@xxxxxxxxxxxxxxxxxxxxx (Ken Lesniak)
Date: Fri, 25 Aug 2000 10:52:19 -0400 (EDT)
Reply-to: lesniak@xxxxxxxxxxxxxxxxxxxxx
Sender: owner-pro64-support@xxxxxxxxxxx
>Hello,
>
>I am trying to link a C pogram (with main), and a Fortran subroutine (called
>from the main in C program);
>
>The SGIf90 linker complains that the Fortran subroutine name is undefined;
>the same routines work perfectly in the Win64 world, and Win32 world with
>Compaq, Intel Fortran compilers.
>
>Thanks,
>Prasad
>
>Please see an example:
>C program:
>
>extern GRAM();
>main(int argc, char* argv[]))
>{
>GRAM();
>}
>
>Fortran program:
>
>      subroutine GRAM()
>      return
>      end

Unix uses a different naming convention for fortran names than microsoft.
I guess microsoft choosing something different than an established
standard must be what Mr. Gates calls innovation ;-)

I believe the rule is to convert the fortran name to lowercase and
append an underscore. In this case: "gram_".

Ken

<Prev in Thread] Current Thread [Next in Thread>