On Friday, 13 March 2015 at 21:12:52 UTC, Robert M. Münch wrote:
How do I declare such missing Windows API functions myself?

In the file you want to use it, you can just write

extern(Windows) void OutputDebugStringA(in char*);

and it should work... or whatever the signature is, check msdn, and remember the ones that take strings tend to need A or W for the ascii or Unicode variants.

dmd comes with a bunch of windows lib link files but not all of them. This one should work though. Just add the file, e.g. user32.lib, to the compile command line. You can also do

pragma(lib, "user32");

and such in the main D file itself you are building and it will add automatically.

Reply via email to