Dynamic D Library

Jarrett Billingsley jarrett.billingsley at gmail.com
Thu Jul 16 19:30:52 PDT 2009


On Thu, Jul 16, 2009 at 9:30 PM, grauzone<none at example.net> wrote:
> I know a simple counter measure: use DLLs as a container for the DDL
> specific format. AFAIK C# does exactly the same.

Hmm!

> By the way, can't you simply put the runtime into a DLL, and load that by
> the host program? D DLL would also depend from the runtime DLL. Then the
> runtime would be shared, wouldn't it?

Even if you did that, you still have the problem where all user-level
typeinfo (including typeinfo for every type in the standard library)
would be duplicated in the host and the library, which wouldn't solve
several issues involved in casting, exception handling, and other
things like array sorting.  Not to mention you still would have to
deal with giving the shared library function pointers etc.

About the only *possible* means of *maybe* doing it is by putting most
of your host in a DLL itself, and just having a stub program which
loads it and calls it.  That way DLLs *can* depend on the host, but it
requires some ridiculous compiling acrobatics which simply aren't
necessary on any other OS.

It's such a silly limitation that DDL is not the only library that has
been implemented to work around it.  EDLL beat us to it:
http://edll.sourceforge.net/



More information about the Digitalmars-d mailing list