D as an extension language
Walter Bright
newshound at digitalmars.com
Thu Aug 31 09:57:38 PDT 2006
Don Clugston wrote:
> I'm doing a lot of Windows stuff in C++, calling DLLs written in D. It's
> not hard. You just need to use extern(C) wrappers on the D functions,
> catch all the D exceptions before returning to C++, and make sure C++
> doesn't hang onto any D pointers that could be gc-ed.
> Otherwise, it's exactly the same as calling a C DLL.
>
> I have some C++ code to simplify dynamic loading of D DLLs in Windows,
> if you're interested (it does the name mangling for you). Useless for
> Linux, of course.
If you could write up a brief page/article/tutorial on that, I think
that would be helpful to a lot of people.
More information about the Digitalmars-d
mailing list