digitalmars.D.learn - Getting the missing Windows functions
- Matt (8/8) Oct 06 2013 I have noticed that a number of the current Windows C functions
- Andrej Mitrovic (9/17) Oct 06 2013 Please see the following project for an updated binding to
- Matt (2/7) Oct 06 2013 I have never had to specify any Windows libs for linking under
- Andrej Mitrovic (4/6) Oct 07 2013 DMD links in user32.lib and kernel32.lib by default. But if you want
- Matt (5/13) Oct 07 2013 The missing functions (or at least the one I'm interested in at
- Andrej Mitrovic (3/7) Oct 07 2013 The kernel32.lib distributed with DMD is likely out of date.
- Mike Parker (5/12) Oct 08 2013 It's very out of date. When I need Windows functions that are missing
- dnewbie (23/39) Oct 08 2013 I always run this when I install a new dmd
I have noticed that a number of the current Windows C functions are not in core.sys.windows.windows.d I tried adding them to the module (after setting up source control so I can roll back any errors I might make), and found that Optlink wasn't finding the functions to resolve the symbols to. How do I go about getting the libraries that have the missing functionality, and once I have it, is it simply a case of editing the above module to make them available?
Oct 06 2013
On Sunday, 6 October 2013 at 19:44:16 UTC, Matt wrote:I have noticed that a number of the current Windows C functions are not in core.sys.windows.windows.d I tried adding them to the module (after setting up source control so I can roll back any errors I might make), and found that Optlink wasn't finding the functions to resolve the symbols to. How do I go about getting the libraries that have the missing functionality, and once I have it, is it simply a case of editing the above module to make them available?Please see the following project for an updated binding to Windows functions: http://www.dsource.org/projects/bindings/wiki/WindowsApi Typically you link to one of the distributed Windows DLLs via an import library, e.g. you would pass "kernel32.lib" at the command-line when calling DMD for any functions in the kernel32 DLL. kernel32.lib is the import lib, and it's distributed along with DMD.
Oct 06 2013
Typically you link to one of the distributed Windows DLLs via an import library, e.g. you would pass "kernel32.lib" at the command-line when calling DMD for any functions in the kernel32 DLL. kernel32.lib is the import lib, and it's distributed along with DMD.I have never had to specify any Windows libs for linking under DMD. What is different about these?
Oct 06 2013
On 10/7/13, Matt <webwraith fastmail.fm> wrote:I have never had to specify any Windows libs for linking under DMD. What is different about these?DMD links in user32.lib and kernel32.lib by default. But if you want to use other libs like GDI you're going to have to pass them at the command line.
Oct 07 2013
On Monday, 7 October 2013 at 14:45:35 UTC, Andrej Mitrovic wrote:On 10/7/13, Matt <webwraith fastmail.fm> wrote:The missing functions (or at least the one I'm interested in at the moment) that I'm trying to use are supposed to be IN kernel32, and have been in there since Windows Vista. That's why I'm a little confused.I have never had to specify any Windows libs for linking under DMD. What is different about these?DMD links in user32.lib and kernel32.lib by default. But if you want to use other libs like GDI you're going to have to pass them at the command line.
Oct 07 2013
On 10/7/13, Matt <webwraith fastmail.fm> wrote:The missing functions (or at least the one I'm interested in at the moment) that I'm trying to use are supposed to be IN kernel32, and have been in there since Windows Vista. That's why I'm a little confused.The kernel32.lib distributed with DMD is likely out of date. See: http://d.puremagic.com/issues/show_bug.cgi?id=6625
Oct 07 2013
On 10/8/2013 6:57 AM, Andrej Mitrovic wrote:On 10/7/13, Matt <webwraith fastmail.fm> wrote:It's very out of date. When I need Windows functions that are missing from the DMD libs, I prototype them as function pointers and load them dynamically. It's a one-off investment for each function and I don't need many of them, so no big deal.The missing functions (or at least the one I'm interested in at the moment) that I'm trying to use are supposed to be IN kernel32, and have been in there since Windows Vista. That's why I'm a little confused.The kernel32.lib distributed with DMD is likely out of date. See: http://d.puremagic.com/issues/show_bug.cgi?id=6625
Oct 08 2013
On Tuesday, 8 October 2013 at 08:54:44 UTC, Mike Parker wrote:On 10/8/2013 6:57 AM, Andrej Mitrovic wrote:I always run this when I install a new dmd cd C:\D\dmd2\windows\lib\ coffimplib "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Lib\advapi32.lib" advapi32.lib coffimplib "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Lib\comctl32.lib" comctl32.lib coffimplib "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Lib\comdlg32.lib" comdlg32.lib coffimplib "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Lib\gdi32.lib" gdi32.lib coffimplib "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Lib\kernel32.lib" kernel32.lib coffimplib "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Lib\shell32.lib" shell32.lib coffimplib "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Lib\shlwapi.lib" shlwapi.lib coffimplib "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Lib\user32.lib" user32.lib coffimplib "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Lib\ws2_32.lib" ws2_32.lib coffimplib "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Lib\wsock32.lib" wsock32.libOn 10/7/13, Matt <webwraith fastmail.fm> wrote:It's very out of date. When I need Windows functions that are missing from the DMD libs, I prototype them as function pointers and load them dynamically. It's a one-off investment for each function and I don't need many of them, so no big deal.The missing functions (or at least the one I'm interested in at the moment) that I'm trying to use are supposed to be IN kernel32, and have been in there since Windows Vista. That's why I'm a little confused.The kernel32.lib distributed with DMD is likely out of date. See: http://d.puremagic.com/issues/show_bug.cgi?id=6625
Oct 08 2013