2 ms·
Yes [0]. extern (C++) int foo(int i, int j, int k); In fact, D can both access C++, and C++ can access D, as you can see further down that link, on classe
by shakna 10y ago
Yes [0].
extern (C++) int foo(int i, int j, int k);
In fact, D can both access C++, and C++ can access D, as you can see further down that link, on classes.
But, if you don't want C++, then [1]:
extern (C) int foo(int i, int j, int k);
Which is actually in the article.
[0] http://dlang.org/spec/cpp_interface.html http://dlang.org/spec/cpp_interface.html
[1] http://dlang.org/spec/interfaceToC.html http://dlang.org/spec/interfaceToC.html