Is it possible to call D functions from C++
Namal via Digitalmars-d
digitalmars-d at puremagic.com
Wed Mar 18 07:50:19 PDT 2015
alright, thanks alot. Now I have.
test.d
import std.stdio;
extern (C++) int foo(int i, int j, int k)
{
writefln("i = %s", i);
writefln("j = %s", j);
writefln("k = %s", k);
return 1;
}
and main.cpp
int foo(int i, int j, int k);
int main()
{
foo(1,2,3);
}
Can you help me show how to compile and link it together please,
thank you.
More information about the Digitalmars-d
mailing list