How are windows import library created

Phil Lavoie maidenphil at hotmail.com
Tue Jan 8 09:21:33 PST 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:
>> 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
>
> I 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

Or is it strictly the linker that generate those? I am quite lost.




More information about the Digitalmars-d-learn mailing list