Link issue and other issues...
Tim Prince
tprince@myrealbox.com
Sun Feb 24 11:59:00 GMT 2008
David Highley wrote:
> Its not that complicated.
> SUBROUTINE XYZ
>
> Windows compiled C++ code generates a reference for:
> _XYZ
Unlikely. You would need extern "C" to avoid C++ mangling.
>
> Run nm -C on the Fortran library and you see:
> T XYZ__
>
The usual alternatives are:
a) with an obsolete Fortran, change your naming on the C side to match
what your Fortran does. C has had the -D macro facility for this purpose
for about 30 years. -DXYZ=XYZ__
b) use iso_c_binding and specify the name which will be seen by C linkage.
This should motivate you to try gfortran or another current Fortran
instead of g77.
More information about the Fortran
mailing list