An individual Fortran source file can be compiled to
an object (
*.o) file instead of to the final
This allows several portions of a program to be compiled
at different times and linked together whenever a new
version of the program is needed.
However, it introduces the issue of object compatibility
across the various object files (and libraries, or
files) that are linked together to produce any particular
Object compatibility is an issue when combining, in one
program, Fortran code compiled by more than one compiler
(or more than one configuration of a compiler).
If the compilers
disagree on how to transform the names of procedures, there
will normally be errors when linking such programs.
Worse, if the compilers agree on naming, but disagree on issues
like how to pass parameters, return arguments, and lay out
COMMON areas, the earliest detected errors might be the
incorrect results produced by the program (and that assumes
these errors are detected, which is not always the case).
g77 generates code that is
object-compatible with code generated by a version of
f2c configured (with, for example,
to be generally compatible with
g77 as built by
f2c will, by default, conform to the appropriate
configuration, but it is possible that older or perhaps even newer
f2c, or versions having certain configuration changes
f2c internals, will produce object files that are
For example, a Fortran string subroutine
argument will become two arguments on the C side: a
Much of this compatibility results from the fact that
g77 uses the same run-time library,
libf2c, used by
g77 gives its version the name
so as to avoid conflicts when linking,
installing them in the same directories,
and so on.
Other compilers might or might not generate code that
is object-compatible with
libg2c and current
and some might offer such compatibility only when explicitly
selected via a command-line option to the compiler.
Note: This portion of the documentation definitely needs a lot of work!