C++ Binding / extern(C++)

Dan murpsoft at hotmail.com
Wed Mar 28 12:51:14 PDT 2007


I was just discussing how difficult it would be for someone to write C++ bindings to a project on the dsource forums, and remembered how I wanted to use Ogre with D and wished Sinbad was done... and how DirectFB is done in C++...

Has anyone figured out how to bind D to C++ on any include/importable level? (source, AST, OBJ files, extern'ing to the *.h files)

If they have, maybe we can set up a project to automatically bind C++ projects in, and Walter might add it to his linker?

For example, matching scrambled names by scrambling  a copy of the D ones, matching it, binding it?

Or perhaps if Walter allowed extern(C++) by matching the identifiers in the AST's and passed the extern(C++) segment to the digital mars C++ compiler with the shared identifiers?

Just my thoughts...



More information about the Digitalmars-d mailing list