From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anders Norlander To: "Richard Hellicar (EML)" Cc: "'cygwin@sourceware.cygnus.com'" Subject: Re: import libraries for 3rd-party DLLs Date: Thu, 11 Mar 1999 00:23:00 -0000 Message-id: <36E77B04.6F9A36F7@hem2.passagen.se> References: <5F052F2A01FBD11184F00008C7A4A8005D57E7@eukbant101.ericsson.se> X-SW-Source: 1999-03/msg00340.html Richard Hellicar (EML) wrote: > > Hello, > > > I'm trying to create an "import library" to allow me to use gcc with a > third-party DLL. > I tried the .lib files supplied with the DLL, but neither worked (one was > for MS, which > did compile, but complained about entry points when executed, the other for > Borland). > > The Cygwin User's Guide (Delorie, Humblet, Noer) suggests a method in > Chapter 4 > ("Linking against DLLs"). However, if I run nm on *any* dll, not just the > one I'm trying > to use, it tells me "No symbols in xyz.dll" The method suggested in the user's guide doesn't work if the dll is stripped. (Hint: shouldn't this be mentioned in the ug?). > 1. Should I expect either the MS or Borland .lib files to be compatible ? Generally, no, and certainly not Borland lib files. There are, however, patches to make gnu tools more MS compatible. > 2. Is there a way of converting incompatible lib files ? Depends on which format it is and if it is an import library or a regular object library. At least in MSVC 6, I think MS changed the format for import libraries and possibly other .lib files as well. This stops the `nm ...' method of creating def files from MS import libraries from working. > 3. Why doesn't nm find symbols in *any* DLL (try: for i in > /winnt/system32/*.DLL; do nm $i; done) See above > 4. exactly what *is* supposed to be in a .def file; should the @4,@8 stuff > be in > there or not ? Semi-colons ? The @x are the total size of the parameters passed to a function using the stdcall (standard win32) calling convention. Those functions are decorated that way by the compiler. Semi-colons are comments. Regards, Anders -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe@sourceware.cygnus.com From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anders Norlander To: "Richard Hellicar (EML)" Cc: "'cygwin@sourceware.cygnus.com'" Subject: Re: import libraries for 3rd-party DLLs Date: Wed, 31 Mar 1999 19:45:00 -0000 Message-ID: <36E77B04.6F9A36F7@hem2.passagen.se> References: <5F052F2A01FBD11184F00008C7A4A8005D57E7@eukbant101.ericsson.se> X-SW-Source: 1999-03n/msg00340.html Message-ID: <19990331194500.u1JqnfFBi8dFDAI_ZKAtBvsa9RTik2DDRsdxZUmQZb8@z> Richard Hellicar (EML) wrote: > > Hello, > > > I'm trying to create an "import library" to allow me to use gcc with a > third-party DLL. > I tried the .lib files supplied with the DLL, but neither worked (one was > for MS, which > did compile, but complained about entry points when executed, the other for > Borland). > > The Cygwin User's Guide (Delorie, Humblet, Noer) suggests a method in > Chapter 4 > ("Linking against DLLs"). However, if I run nm on *any* dll, not just the > one I'm trying > to use, it tells me "No symbols in xyz.dll" The method suggested in the user's guide doesn't work if the dll is stripped. (Hint: shouldn't this be mentioned in the ug?). > 1. Should I expect either the MS or Borland .lib files to be compatible ? Generally, no, and certainly not Borland lib files. There are, however, patches to make gnu tools more MS compatible. > 2. Is there a way of converting incompatible lib files ? Depends on which format it is and if it is an import library or a regular object library. At least in MSVC 6, I think MS changed the format for import libraries and possibly other .lib files as well. This stops the `nm ...' method of creating def files from MS import libraries from working. > 3. Why doesn't nm find symbols in *any* DLL (try: for i in > /winnt/system32/*.DLL; do nm $i; done) See above > 4. exactly what *is* supposed to be in a .def file; should the @4,@8 stuff > be in > there or not ? Semi-colons ? The @x are the total size of the parameters passed to a function using the stdcall (standard win32) calling convention. Those functions are decorated that way by the compiler. Semi-colons are comments. Regards, Anders -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe@sourceware.cygnus.com