digitalmars.D.learn - DMD's kernel32.lib missing symbols?
- simendsjo (7/7) Jul 29 2011 Not sure how I can search for symbols in the library, but it seems the
- Simon (7/14) Jul 29 2011 Shows how to make your own import lib for windows system dll:
- simendsjo (3/15) Jul 29 2011 I've tried using implib too, but replacing dmd's own kernel32.lib seems
- Simon (5/24) Jul 29 2011 What sort of problems? It's worked perfectly for me so far.
- simendsjo (14/37) Jul 30 2011 PTLINK (R) for Win32 Release 8.00.12
- torhu (5/44) Jul 30 2011 Both those symbols are definitely present in the kernel32.lib that comes...
- simendsjo (12/61) Jul 31 2011 These errors comes after replacing kernel32.lib in dmd. Not sure if that...
- simendsjo (20/69) Jul 31 2011 The implib created file is different from the one in the distribution,
- simendsjo (3/52) Jul 31 2011 Hmmm.. Got coffimplib working. No idea what I did to break it before.
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?
Jul 29 2011
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. -- My enormous talent is exceeded only by my outrageous laziness. http://www.ssTk.co.uk
Jul 29 2011
On 29.07.2011 19:13, Simon wrote:On 29/07/2011 11:14, simendsjo wrote:I've tried using implib too, but replacing dmd's own kernel32.lib seems to create problems.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.
Jul 29 2011
On 29/07/2011 19:27, simendsjo wrote:On 29.07.2011 19:13, Simon wrote:What sort of problems? It's worked perfectly for me so far. -- My enormous talent is exceeded only by my outrageous laziness. http://www.ssTk.co.ukOn 29/07/2011 11:14, simendsjo wrote:I've tried using implib too, but replacing dmd's own kernel32.lib seems to create problems.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.
Jul 29 2011
On 29.07.2011 22:06, Simon wrote:On 29/07/2011 19:27, simendsjo wrote: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 4 :\dmd\windows\bin\..\lib\phobos.lib(dmain2) Error 42: Symbol Undefined _WideCharToMultiByte 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.On 29.07.2011 19:13, Simon wrote:What sort of problems? It's worked perfectly for me so far.On 29/07/2011 11:14, simendsjo wrote:I've tried using implib too, but replacing dmd's own kernel32.lib seems to create problems.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.
Jul 30 2011
On 30.07.2011 11:43, simendsjo wrote:On 29.07.2011 22:06, Simon wrote: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.On 29/07/2011 19:27, simendsjo wrote: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 4 :\dmd\windows\bin\..\lib\phobos.lib(dmain2) Error 42: Symbol Undefined _WideCharToMultiByte 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.On 29.07.2011 19:13, Simon wrote:What sort of problems? It's worked perfectly for me so far.On 29/07/2011 11:14, simendsjo wrote:I've tried using implib too, but replacing dmd's own kernel32.lib seems to create problems.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.
Jul 30 2011
On 30.07.2011 16:30, torhu wrote:On 30.07.2011 11:43, simendsjo wrote:These errors comes after replacing kernel32.lib in dmd. Not sure if that was clear from my post. How is kernel32.lib supplied with dmd created? This is a simple test showing a missing symbol: pragma(lib, "kernel32.lib"); extern(Windows) { uint LocaleNameToLCID(const(wchar)*, int); } void main() { auto us = LocaleNameToLCID("en-US", 0); }On 29.07.2011 22:06, Simon wrote: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.On 29/07/2011 19:27, simendsjo wrote: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 4 :\dmd\windows\bin\..\lib\phobos.lib(dmain2) Error 42: Symbol Undefined _WideCharToMultiByte 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.On 29.07.2011 19:13, Simon wrote:What sort of problems? It's worked perfectly for me so far.On 29/07/2011 11:14, simendsjo wrote:I've tried using implib too, but replacing dmd's own kernel32.lib seems to create problems.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.
Jul 31 2011
On 30.07.2011 16:30, torhu wrote:On 30.07.2011 11:43, simendsjo wrote:The implib created file is different from the one in the distribution, but I have no idea what this means: ** ORIGINAL ** ============== c:\dmd\windows\lib>find "LocalFree" kernel32.lib ---------- KERNEL32.LIB LocalFree ♀_LocalFree 4♀KERNEL32.dll LocalFree ♀_LocalFree 4}♀ ** IMPLIB ** ============ c:\dmd\windows\lib>implib /system kernel32.lib \Windows\system32\kernel32.dll c:\dmd\windows\lib>find "LocalFree" kernel32.lib ---------- KERNEL32.LIB LocalFree _LocalFree♀kernel32.dll LocalFree _MoveFileExA!╔¶↓_QueryPerformanceCounter!c▬¶_ReadConsoleOutputA!╙▬ _LocalFreeZ¶On 29.07.2011 22:06, Simon wrote: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.On 29/07/2011 19:27, simendsjo wrote: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 4 :\dmd\windows\bin\..\lib\phobos.lib(dmain2) Error 42: Symbol Undefined _WideCharToMultiByte 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.On 29.07.2011 19:13, Simon wrote:What sort of problems? It's worked perfectly for me so far.On 29/07/2011 11:14, simendsjo wrote:I've tried using implib too, but replacing dmd's own kernel32.lib seems to create problems.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.
Jul 31 2011
On 30.07.2011 16:30, torhu wrote:On 30.07.2011 11:43, simendsjo wrote:Hmmm.. Got coffimplib working. No idea what I did to break it before.On 29.07.2011 22:06, Simon wrote: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.On 29/07/2011 19:27, simendsjo wrote: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 4 :\dmd\windows\bin\..\lib\phobos.lib(dmain2) Error 42: Symbol Undefined _WideCharToMultiByte 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.On 29.07.2011 19:13, Simon wrote:What sort of problems? It's worked perfectly for me so far.On 29/07/2011 11:14, simendsjo wrote:I've tried using implib too, but replacing dmd's own kernel32.lib seems to create problems.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.
Jul 31 2011