Linking in advapi32.lib and netlib32.lib

Daniel Keep daniel.keep.lists at gmail.com
Tue Apr 18 08:42:20 PDT 2006



Don Clugston wrote:
> John C wrote:
>> Daniel Keep wrote:
>>> Hi, me again.
>>>
>>> I was having a poke around phobos to see if there was anything that
>>> needed filling out, and found that expandTilde was missing a Windows
>>> implementation.
>>>
>>> After a little trawling through MSDN, I've worked out what to do, but I
>>> can't for the life of me get the damn code to link.
>>>
>>> I know I need to link to advapi32.lib and netlib32.lib.  If I link to
>>> advapi32.lib, I then get "Error: A dynamic link library (DLL)
>>> initialization routine failed.".  Oddly enough, it compiled without
>>> specifying netlib32.lib; when I do specify it, it can't find it.
>>>
>>> Now, I'm assuming that the problem with advapi32.lib is that it's on
>>> COFF and not OMF (I can't actually remember where that copy of
>>> advapi32.lib came from >_<).  I've seen lots of references to
>>> coff2omf.exe, but the only one I can find costs $15 from DM.
>>>
>>> So:
>>>
>>> 1.  Is there a free tool to get dmd-compatible versions of advapi32.lib,
>>> netlib32.lib, (insert other win32 system libraries), or am I going to
>>> have to use std.loader?
>>
>> coffimplib will convert Microsoft COFF libraries to OMF format.
>> http://www.digitalmars.com/ctg/coffimplib.html
>> ftp://ftp.digitalmars.com/coffimplib.zip
>>
>>>
>>> 2.  Is there anywhere I can download OMF versions of those libraries?
>>>
>>> P.S.  I just checked the Win32 api project, and they don't have lm.h
>>> converted (for stuff in netlib32), and no .lib files :(
> 
> Come on, give us a bit of time... that project only started less than
> three weeks ago! :-). The lmXXX stuff will come before too long.
> 

No!  Not fast enough! :P

After having a poke around some of those MinGW headers... yikes.  If I
ever work out what I'm doing wrong, I might try my hand at converting a few.

>>>
>>> If I can get this working, I'll donate the windows implementation of
>>> expandTilde (if Walter wants it, of course :).
>>>
>>>     -- Daniel "why you no linky, damnit?"
>>>

-- 

v1sw5+8Yhw5ln4+5pr6OFma8u6+7Lw4Tm6+7l6+7D
a2Xs3MSr2e4/6+7t4TNSMb6HTOp5en5g6RAHCP    http://hackerkey.com/



More information about the Digitalmars-d mailing list