The information on building a statically linked program is the same as for
building normally with the following exceptions:
- Make sure that both Fortran and C sources are specifying the same calling convention,
and in the specification of the calling convention, the names of the called procedure are
spelled with the same case in both sources.
If no calling convention is specified in either source, both will use the same default
convention, and the link should succeed.
- Make sure that the procedure being called does not appear in a dllimport or dllexport
directive. Exported symbols have special decorations, and this can cause the link to fail.
- It is easiest to have a Fortran main program. For information on linking a C main to a
Fortran procedure, see Non-Fortran Main Program.
- When linking the Fortran main program, add the object file name to the link command. No other libraries
or special options should be required.
For detailed information, see Interoperability with C