On Wednesday, 18 March 2015 at 14:20:19 UTC, Benjamin Thaut wrote:
On Wednesday, 18 March 2015 at 14:17:13 UTC, Namal wrote:
Hello, as in the title. How can I call D functions from C++ (If my main() is in a c++ file).

Thanks alot!

D:

extern(C++) void SomeDFunction()
{
  doSomething();
}

C++:

void SomeDFunction();

void main()
{
  SomeDFunction();
}

Please also see:
http://dlang.org/cpp_interface.html

Kind Regards
Benjamin

I'm pretty sure the OP wanted to call D functions from C++, not C++ functions from D.

Reply via email to