Interfacing D with C and C++

Peter Alexander via Digitalmars-d digitalmars-d at puremagic.com
Sat Aug 23 16:24:20 PDT 2014


Welcome!

> 1. What is the current support for calling C/C++ free functions 
> from D? What level of mangling is supported? What data types 
> can be passed without translation from D to C/C++?

> 3. How can a C++ object be used from D? Can C++ methods be 
> called from D? The question applies to value types - no 
> virtuals - and polymorphic types with virtuals, inheritance 
> etc. And of course simple C structs.

> 5. How about the other way? Can a C/C++ function call a D 
> function?

http://dlang.org/cpp_interface.html


> 2. How about template functions? Is it possible to call a C++ 
> template function from D?

> 4. How about template objects? One issue is that many C++ 
> interfaces pass std::string and std::map<..., ...> as 
> parameters. How feasible is to manipulate such objects in D?

Not yet.

http://forum.dlang.org/thread/lslofn$2iro$1@digitalmars.com


More information about the Digitalmars-d mailing list