[Issue 18894] New: extern(C++) interfaces + OSX
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon May 21 21:46:07 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=18894
Issue ID: 18894
Summary: extern(C++) interfaces + OSX
Product: D
Version: D2
Hardware: All
OS: Mac OS X
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: aliloko at gmail.com
Not sure if this is known, on macOS to get C++ ABI compatibility with a pure
virtual class it seems you need to add an additional dummy call.
This is not required on Windows.
extern(C++) interface MyCPPCInterface
{
// Simulate C++ destructor so that the v-table layout is the same
void destroyThis();
// required not to crash...
version (OSX) void unknownCall(); // THIS IS SURPRISING
void otherMethod1();
[ Other methods... ]
}
--
More information about the Digitalmars-d-bugs
mailing list