DMD's kernel32.lib missing symbols?

torhu no at spam.invalid
Sat Jul 30 07:30:40 PDT 2011


On 30.07.2011 11:43, simendsjo wrote:
> On 29.07.2011 22:06, Simon wrote:
>>  On 29/07/2011 19:27, simendsjo wrote:
>>>  On 29.07.2011 19:13, Simon wrote:
>>>>  On 29/07/2011 11:14, simendsjo wrote:
>>>>>  Not sure how I can search for symbols in the library, but it seems the
>>>>>  library is missing functions.
>>>>>  I've tried using coffimplib on kernel32.lib from the Windows SDK,
>>>>>  but it
>>>>>  neither produces a new library or give me an error.
>>>>>
>>>>>  What Windows version is the library based on?
>>>>>  How can I check what symbols exists?
>>>>>  Is there a way to convert WinSDK's library to omf?
>>>>
>>>>  Shows how to make your own import lib for windows system dll:
>>>>
>>>>  http://www.sstk.co.uk/d.php
>>>>
>>>>  Been ages since I did that though so let me know if you have problems.
>>>>
>>>
>>>  I've tried using implib too, but replacing dmd's own kernel32.lib seems
>>>  to create problems.
>>
>>  What sort of problems? It's worked perfectly for me so far.
>>
>
> PTLINK (R) for Win32  Release 8.00.12
> opyright (C) Digital Mars 1989-2010  All rights reserved.
> ttp://www.digitalmars.com/ctg/optlink.html
> :\dmd\windows\bin\..\lib\phobos.lib(dmain2)
> Error 42: Symbol Undefined _LocalFree at 4
> :\dmd\windows\bin\..\lib\phobos.lib(dmain2)
> Error 42: Symbol Undefined _WideCharToMultiByte at 32
>
> etc..
>
> I tried to replace kernel32.lib like this:
> c:\dmd\windows\lib>implib /system kernel32.lib
> \Windows\system32\kernel32.dll
>
> As this didn't work, I recompiled druntime and phobos with the new
> kernel32.lib, but I get the same errors.

Both those symbols are definitely present in the kernel32.lib that comes 
with DMD 2.053.  Just grep for them and you'll see.  There is something 
going on with either your DMD install or the command line passed to the 
linker.


More information about the Digitalmars-d-learn mailing list