This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Linking to functions in libraries with different names
- From: Matthew Brett <matthew dot brett at mrc-cbu dot cam dot ac dot uk>
- To: cygwin at cygwin dot com
- Date: Wed, 19 Dec 2001 21:46:05 +0000 (GMT)
- Subject: Linking to functions in libraries with different names
Hi,
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,
Best,
Matthew
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/