Incorporating D

q66 quaker66 at gmail.com
Fri Jan 25 13:06:59 PST 2013


>> 2) Is there a way to start adding D code to a C++ projects?
>
> Yes. You'll need to expose parts of the D code as extern(C) or 
> extern(C++) to interface with it, and remember to initialize 
> the D  runtime.
>

As he apparently is on Windows, you can only do this with a D 
DLL, which are likely to be a PITA (but at least they should work 
unlike on un*x); you can't really link D object files and C/C++ 
object files together, as on win32 OMF is used (you could use 
unilink, but that's so obscure I wouldn't expect a newbie to mess 
with this at all). So I'd take this as "no"


More information about the Digitalmars-d mailing list