Compiled dmd2.032 in VC++ 2009!

Jeremie Pelletier jeremiep at gmail.com
Fri Sep 4 12:19:34 PDT 2009


Jarrett Billingsley Wrote:

> On Fri, Sep 4, 2009 at 10:22 AM, Jeremie Pelletier<jeremiep at gmail.com> wrote:
> > Jason House Wrote:
> >
> >> Don Wrote:
> >>
> >> > Interestingly since DMD has extern(C++), it ought to be possible to
> >> > convert a single module to D, and still link it in...
> >>
> >> extern(C++) support in D is nearly a joke. There are some big areas for improvement, such as support for non-virtual functions, or allowing use of new, ... It's unusable to the point that I can't connect D code to existing C++ or even write efficient wrappers. I've resorted to simply using extern(C) code in C++ and then wrappers in D to use those functions...
> >
> > From what I know it was mostly intended for interfaces, and it works wonders when binding to COM code in Windows. A lot of the new features of recent windows versions are only available through COM, extern(C++) makes it dead easy to write their bindings.
> 
> You've been able to bind to COM interfaces in D for years. extern(C++)
> hasn't changed that, as far as I know.

True, but it has not always been that simple, now I can take the IDL file, run it through a few regular expressions and I got my D binding :)

extern(C++):
interface ID2D1Factory : IUnknown { ... }

I don't remember what the syntax in D1 looks like for COM interfacing, but I remember having some issues writing bindings.



More information about the Digitalmars-d mailing list