>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
|