Linking with DMD

Anonymous herr.pilsner at yahoo.de
Thu Jun 21 13:22:14 PDT 2012


On Thursday, 21 June 2012 at 19:42:46 UTC, Walter Bright wrote:
> On 6/21/2012 11:14 AM, Anonymous wrote:
>> On Thursday, 21 June 2012 at 18:06:12 UTC, Walter Bright wrote:
>>> On 6/21/2012 10:48 AM, Anonymous wrote:
>>>> And that I can link to them by simply specifying the
>>>> DLL file... not having to find a matching lib file on the 
>>>> internet...
>>>
>>> DLL files contain insufficient information to link 
>>> successfully to them.
>>
>> GCC (MinGW) is able to do this...
>
> For example, many names in Windows DLLs are:
>
>     _foo at 16
>
> which means there are 16 bytes worth of parameters. However, 
> there's zero information on how many parameters there are or 
> what their types are.

But you declare it in your code like this:

extern (Windows) int foo(int a, void* b, void* c, uint d);


More information about the Digitalmars-d mailing list