A special treat

Walter Bright newshound1 at digitalmars.com
Tue Feb 9 14:01:10 PST 2010

Steven Schveighoffer wrote:
> But implicitly loaded DLLs aren't supported by D!

Sure they are, see the program in dmd/samples/d

>> Shared libraries (on Linux) and Windows DLLs are very different things.
> Yes, I agree they are two different problems to solve.  But to a 
> developer, they look the same.

They aren't the same, even to a developer, as they do different things 
and behave very differently.

>> Phobos as a DLL is a different problem than creating DLLs with D. DLLs 
>> in D can be created that are statically linked with Phobos, and that 
>> can be accessed by any executable in any language.
> They can be accessed by another D program?  My understanding is that all 
> kinds of weird problems happen if you dynamically link two D programs 
> together.  I'm not speaking from first-hand experience, I may be wrong.

At a minimum, if you expose a C interface from your DLL, it can interact 
with any other DLL.

> It is very important that Phobos be a dynamic library and that you can 
> build dynamic libraries easily without manual manipulation of the 
> runtime.  If these two things are accomplished, then D can say it 
> supports dynamic libraries, not before.  Half ass support doesn't 
> count.

There's still a lot you can do with DLLs and D.

More information about the Digitalmars-d mailing list