This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: dlltool & link to VC++ generated DLL



At 02:00 PM 4/17/2001, Bill Grigg wrote:

><snip>




>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@rfk.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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]