digitalmars.D.bugs - [Issue 18894] New: extern(C++) interfaces + OSX
- d-bugmail puremagic.com (26/26) May 21 2018 https://issues.dlang.org/show_bug.cgi?id=18894
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 puremagic.com Reporter: aliloko 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... ] } --
May 21 2018