Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-Id: <4.3.1.2.20010417144121.0207acc8@pop.ma.ultranet.com> X-Sender: lhall AT pop DOT ma DOT ultranet DOT com X-Mailer: QUALCOMM Windows Eudora Version 4.3.1 Date: Tue, 17 Apr 2001 14:43:10 -0400 To: Bill Grigg , cygwin AT cygwin DOT com From: "Larry Hall (RFK Partners, Inc)" Subject: Re: dlltool & link to VC++ generated DLL In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" At 02:00 PM 4/17/2001, Bill Grigg wrote: > >Linking Against DLLs >If you have an existing DLL already, you need to build a Cygwin-compatible >import library (The supplied ones should work, but you might not have them) >to link against. Unfortunately, there is not yet any tool to do this >automatically. However, you can get most of the way by creating a .def file >with these commands (you might need to do this in bash for the quoting to >work correctly): >echo EXPORTS > foo.defnm foo.dll | grep ' T _' | sed 's/.* T _//' >> foo.def >Note that this will only work if the DLL is not stripped. Otherwise you will >get an error message: "No symbols in foo.dll". >Once you have the .def file, you can create an import library from it like >this: >dlltool --def foo.def --dllname foo.dll --output-lib foo.a > > >7. I skipped the "echo EXPORTS ..." part and just built my own .def file, >MYDLL.def. See below: You shouldn't do this. My guess is that you now have the wrong function name due to improper calling convention. Fix this or do the step you skipped. >LIBRARY MYDLL > >EXPORTS > Set_Status_Nav > Get_Status_Nav Larry Hall lhall AT rfk DOT com RFK Partners, Inc. http://www.rfk.com 118 Washington Street (508) 893-9779 - RFK Office Holliston, MA 01746 (508) 893-9889 - FAX -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple