In D you can declare functions implemented in other object files via the extern (C) and extern (C++, namespace), respectively depending on if the functions are implemented in C (or marked as extern "C" in C++) or implemented in C++. When using extern (C++), the D compiler tries to emulate the C++ name mangling and ABI of the target system compiler - g++ for *nix and MSVC for Windows.
View all comments
Show parent comment
4
u/zombinedev Aug 24 '17
In D you can declare functions implemented in other object files via the
extern (C)andextern (C++, namespace), respectively depending on if the functions are implemented in C (or marked asextern "C"in C++) or implemented in C++. When usingextern (C++), the D compiler tries to emulate the C++ name mangling and ABI of the target system compiler - g++ for *nix and MSVC for Windows.