Linking C modules to Fortran (I know, I know, have mercy....)

From: James Kimble (jkimble_at_one.net)
Date: 04/26/04


Date: 26 Apr 2004 07:40:39 -0700

I'm porting a Compaq/MS Fortran program to good old fashioned
standard Fortran 95 on a Unix box (HP-UX and f90). The person
that wrote the original application used the DFWIN module of
Windows functions in many places making porting a real headache.

The only good news is that the only functions he appeared to use
were ZeroMemory and CopyMemory. These look suspiciosly like the
memset and memcpy functions in C and I'm thinking of writing a
wrapper function in C that I could then link to this program so
the ZeroMemory and CopyMemory functions (sorry, subroutines)
could all be called just as they are today.

I've linked C and Fortran in the distant past but never with
this compiler. Anyone out there have experience with this?
Aren't the calling conventions for Fortran and C generally the
same?

Any help/suggestions would be VERY MUCH appreciated.

Thanks,

James Kimble