Dynamic D Library
Jarrett Billingsley
jarrett.billingsley at gmail.com
Thu Jul 16 16:27:35 PDT 2009
On Thu, Jul 16, 2009 at 7:13 PM, Rainer Deyke<rainerd at eldwood.com> wrote:
> Jarrett Billingsley wrote:
>> ON WINDOWS, DLLs are not allowed to have unresolved externals. So if
>> you create a DLL in D, yes, Phobos will be linked in. THERE IS
>> NOTHING THAT CAN BE DONE ABOUT THAT. It's a limitation on the way
>> DLLs work.
>
> In theory, wouldn't it also be possible to solve this problem by passing
> a pointer to the external dependencies into the DLL via an
> initialization function?
That's how many apps on Windows do plugins; they pass a sort of global
structure pointer that holds a bunch of function pointers into the
host. Basically doing the runtime linking by hand.
It's *possible*, but very tedious. It seems almost pointless when you
consider the existence of DDL.
More information about the Digitalmars-d
mailing list