www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - .lib problem

reply "Lloyd Dupont" <ld-REMOVE galador.net> writes:
what if the Win32 function I'm interested in don't seem to be in .lib 
provide by dmd...
(for example vista & up windows function)
Can I just use the .lib which come from the windows SDK? 
Jun 03 2011
parent reply Andrej Mitrovic <andrej.mitrovich gmail.com> writes:
If you have coffimplib (which isn't free), then you could just convert
the windows sdk import lib to OMF format.

Otherwise, you can create an import library from a DLL.

Find the DLL (e.g. kernel32.dll), and run:
implib /s kernel32.lib kernel32.dll

Then link with the new import lib. I think that should work.
Jun 03 2011
next sibling parent "Lloyd Dupont" <ld-REMOVE galador.net> writes:
Thanks I'll try tomorrow! :)
(now I should really go to bed...)

"Andrej Mitrovic"  wrote in message 
news:mailman.565.1307117174.14074.digitalmars-d-learn puremagic.com...

If you have coffimplib (which isn't free), then you could just convert
the windows sdk import lib to OMF format.

Otherwise, you can create an import library from a DLL.

Find the DLL (e.g. kernel32.dll), and run:
implib /s kernel32.lib kernel32.dll

Then link with the new import lib. I think that should work. 
Jun 03 2011
prev sibling parent reply "Lloyd Dupont" <ld-REMOVE galador.net> writes:
Where can I find this "implib" tool you mentioned?

I have the latest Windows SDK and Visual Studio 2010. Yet when I perform a 
search in program files I can't find it!!
:(

"Andrej Mitrovic"  wrote in message 
news:mailman.565.1307117174.14074.digitalmars-d-learn puremagic.com...

If you have coffimplib (which isn't free), then you could just convert
the windows sdk import lib to OMF format.

Otherwise, you can create an import library from a DLL.

Find the DLL (e.g. kernel32.dll), and run:
implib /s kernel32.lib kernel32.dll

Then link with the new import lib. I think that should work. 
Jun 03 2011
parent reply Andrej Mitrovic <andrej.mitrovich gmail.com> writes:
http://ftp.digitalmars.com/bup.zip

Docs here:
http://www.digitalmars.com/ctg/implib.html
Jun 03 2011
parent reply "Lloyd Dupont" <ld-REMOVE galador.net> writes:
Sweet, thanks you very much! :)

"Andrej Mitrovic"  wrote in message 
news:mailman.573.1307123755.14074.digitalmars-d-learn puremagic.com...

http://ftp.digitalmars.com/bup.zip

Docs here:
http://www.digitalmars.com/ctg/implib.html 
Jun 03 2011
parent Andrej Mitrovic <andrej.mitrovich gmail.com> writes:
My bad, coffimplib is actually free and downloadable from:
http://ftp.digitalmars.com/coffimplib.zip

It's coff2omf which isn't free, that one converts actual object code
(not import libraries) to OMF. Sometimes coffimplib works better than
implib so you might want to have that in mind.
Jun 04 2011