This is the mail archive of the
mailing list for the Cygwin project.
Re: dlltool & link to VC++ generated DLL
- To: Bill Grigg <wgrigg at draper dot com>, cygwin at cygwin dot com
- Subject: Re: dlltool & link to VC++ generated DLL
- From: "Larry Hall (RFK Partners, Inc)" <lhall at rfk dot com>
- Date: Tue, 17 Apr 2001 14:43:10 -0400
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
>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
>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.
Larry Hall email@example.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