Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Wed, 19 Dec 2001 21:46:05 +0000 (GMT) From: Matthew Brett To: cygwin AT cygwin DOT com Subject: Linking to functions in libraries with different names Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 AT 16 and FUNCTION2 AT 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 AT 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/