www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Generating OMF DLL implibs on Windows =?UTF-8?B?4oCTIHJlbGlhYmxl?=

reply David Nadlinger <see klickverbot.at> writes:
Since I made some pretty negative experiences trying to get linking DLL 
on Windows to work some years ago, I have always been using dynamic 
loading (in the sense of looking up the symbol addresses at runtime) to 
avoid any COFF/OMF-related problems. However, this obviously also has 
its disadvantages, like not being able to link the libraries in question 
statically on other operating systems.

Therefore, I'd like to know if the situation got better in the meantime, 
i.e. whether there is a OMF DLL import library tool available by now 
that Just Works, in the sense that you can just tell anybody who wants 
to build your project on Windows to use it without feeling guilty?

Thanks,
David
Aug 04 2011
next sibling parent Trass3r <un known.com> writes:
I've never had problems with import libraries on Windoze.
I think I always needed to pass the /system switch to implib though.
coffimplib also works good if a COFF import library already exists.

Only PITA is static linking of external code.
Aug 04 2011
prev sibling next sibling parent simendsjo <simendsjo gmail.com> writes:
On 04.08.2011 14:38, David Nadlinger wrote:
 Since I made some pretty negative experiences trying to get linking DLL
 on Windows to work some years ago, I have always been using dynamic
 loading (in the sense of looking up the symbol addresses at runtime) to
 avoid any COFF/OMF-related problems. However, this obviously also has
 its disadvantages, like not being able to link the libraries in question
 statically on other operating systems.

 Therefore, I'd like to know if the situation got better in the meantime,
 i.e. whether there is a OMF DLL import library tool available by now
 that Just Works, in the sense that you can just tell anybody who wants
 to build your project on Windows to use it without feeling guilty?

 Thanks,
 David

I recently had to replace kernel32.lib that is distributed with DMD. implib didn't work very well, but by downloading the Win SDK and using coffimplib it worked. If using implib, remeber the /system switch. I don't think coffimplib or implib Just Works for all cases, although I would hope it does.
Aug 04 2011
prev sibling parent Kagamin <spam here.lot> writes:
David Nadlinger Wrote:

 Since I made some pretty negative experiences trying to get linking DLL 
 on Windows to work some years ago, I have always been using dynamic 
 loading (in the sense of looking up the symbol addresses at runtime) to 
 avoid any COFF/OMF-related problems. However, this obviously also has 
 its disadvantages, like not being able to link the libraries in question 
 statically on other operating systems.
 
 Therefore, I'd like to know if the situation got better in the meantime, 
 i.e. whether there is a OMF DLL import library tool available by now 
 that Just Works, in the sense that you can just tell anybody who wants 
 to build your project on Windows to use it without feeling guilty?
 
 Thanks,
 David

Had to use modern version of advapi32.lib from WinSDK, had no problem with coffimplib.
Aug 04 2011