Linking D DLL to C
Unknown W. Brackets
unknown at simplemachines.org
Thu Jun 1 21:53:23 PDT 2006
If you want a dll, and you're staticly linking it, you have to create an
import library from the dll...
To link dynamically, you'll typically use LoadLibrary(), etc. at least
on Windows.
-[Unknown]
> BCS wrote:
>> First of all I'd try the using dmc/optlink instead of gcc. I haven't
>> tried this but dmd on win does have some issues with object/lib file
>> compatibility (at least with VS).
>
> Interesting. That did it:
>
> C:>dmc -c test2.c
>
> C:>dmc test2.obj mydll.lib
> link test2,,,mydll+user32+kernel32/noi;
>
> C:>test2
> hello dll world
>
> Are there any plans to fix this? Is this perceived as a serious problem?
>
> -Kirk McDonald
More information about the Digitalmars-d
mailing list