f2cOn systems with Fortran compilers other than f2c and g77,
code compiled by g77 is not expected to work
well with code compiled by the native compiler.
(This is true for f2c-compiled objects as well.)
Libraries compiled with the native compiler probably will have
to be recompiled with g77 to be used with g77-compiled code.
Reasons for such incompatibilities include:
CALL FOO might be compiled
by g77 to call a procedure the linker ld sees
given the name _foo_, while the apparently corresponding
statement SUBROUTINE FOO might be compiled by the
native compiler to define the linker-visible name _foo,
or _FOO_, and so on.
This is why simply getting g77 to
transform procedure names the same way a native
compiler does is not usually a good idea--unless
some effort has been made to ensure that, aside
from the way the two compilers transform procedure
names, everything else about the way they generate
code for procedure interfaces is identical.
For example, on the Sun you
would have to add -L/usr/lang/SCx.x -lF77 -lV77 to the link
command.