digitalmars.D - Generating OMF DLL implibs on Windows =?UTF-8?B?4oCTIHJlbGlhYmxl?=
- David Nadlinger (12/12) Aug 04 2011 Since I made some pretty negative experiences trying to get linking DLL
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
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
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, DavidI 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
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, DavidHad to use modern version of advapi32.lib from WinSDK, had no problem with coffimplib.
Aug 04 2011