digitalmars.D.learn - How are windows import library created
- Phil Lavoie (11/11) Jan 07 2013 Hi,
- Phil Lavoie (15/26) Jan 08 2013 I am asking this because if I compare a handmade import library,
- Phil Lavoie (2/30) Jan 08 2013 Or is it strictly the linker that generate those? I am quite lost.
- kiskami (10/10) Jan 10 2013 Hi, im no expert in this, but my workflow used to be the
Hi, I am currently trying to create an import library for opengl32.dll. I used this command: implib /noi /system ... To create the import library. However, the exported symbols do not have the at suffix ( someInt) (supposed to be _stdcall, so translated to extern( Windows ), which expects ... suffixes). How to I add those using implib? Or how are the import library for the compiler created (what tool + options)? Thanks, Phil
Jan 07 2013
On Monday, 7 January 2013 at 16:48:02 UTC, Phil Lavoie wrote:Hi, I am currently trying to create an import library for opengl32.dll. I used this command: implib /noi /system ... To create the import library. However, the exported symbols do not have the at suffix ( someInt) (supposed to be _stdcall, so translated to extern( Windows ), which expects ... suffixes). How to I add those using implib? Or how are the import library for the compiler created (what tool + options)? Thanks, PhilI am asking this because if I compare a handmade import library, for example kernel32.lib with the one provided with the compiler I can see that, in the hand made one, there are no visible ordinal expressions for none of the exported symbols, whereas you can find them in the one provided with the compiler. I'd like to know why is extern( Windows ) expecting an ordinal and how is this ordinal calculated? But this question is really just out of pure curiousity. A more practical question remains: how where the import library provided with dmd created? How can I recreate the final products, I would really like to link against opengl32.dll with an import library. Thank you, Phil
Jan 08 2013
On Tuesday, 8 January 2013 at 16:57:51 UTC, Phil Lavoie wrote:On Monday, 7 January 2013 at 16:48:02 UTC, Phil Lavoie wrote:Or is it strictly the linker that generate those? I am quite lost.Hi, I am currently trying to create an import library for opengl32.dll. I used this command: implib /noi /system ... To create the import library. However, the exported symbols do not have the at suffix ( someInt) (supposed to be _stdcall, so translated to extern( Windows ), which expects ... suffixes). How to I add those using implib? Or how are the import library for the compiler created (what tool + options)? Thanks, PhilI am asking this because if I compare a handmade import library, for example kernel32.lib with the one provided with the compiler I can see that, in the hand made one, there are no visible ordinal expressions for none of the exported symbols, whereas you can find them in the one provided with the compiler. I'd like to know why is extern( Windows ) expecting an ordinal and how is this ordinal calculated? But this question is really just out of pure curiousity. A more practical question remains: how where the import library provided with dmd created? How can I recreate the final products, I would really like to link against opengl32.dll with an import library. Thank you, Phil
Jan 08 2013
Hi, im no expert in this, but my workflow used to be the following: Windows (vc) lib conversion to a dmd linkable one: 1. def file generation, from windows lib: coffimplib.exe -e ecl.lib 2. edit def file for the missing symbols, for ex: _SDL_Init = SDL_Init ==> _SDL_Init 4 = SDL_Init 3. update lib: implib.exe SDL.lib SDL.def In a recent project I only needed the 1. and 3. points, and to use extern (C), because the def file was ok!
Jan 10 2013