Linking to functions in libraries with different names

Matthew Brett
Wed Dec 19 14:00:00 GMT 2001


I would really appreciate some advice on a windows linking question.
I have a large body of code, in fact in Fortran, with function names
like FUNCTION1 and FUNCTION2, which will call functions exported from
an external library.  I have the relevant libraries, with no source,
in MS .lib format; unfortunately, the libraries export the names of
the functions above as FUNCTION1@16 and FUNCTION2@8.

If I understand correctly (and I am not atall sure I do), I can't
successfully use any of the fancy name alias features of dlltool,
because I don't have the library source.  So, is there any way I can
get the gcc linker to link the function FUNCTION1 in my code to the
routine FUNCTION1@16 in the .lib file?  More generally, is there a way
of getting the linker to link a function foo() in my code to a library
routine bar(), for which I do not have the source?  Can it be done
with linker scripts, for example?

Many thanks for any help,



Unsubscribe info:
Bug reporting:

More information about the Cygwin mailing list