[Issue 20082] Struct with extern destructor that's never called causes link error

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Jul 25 22:39:53 UTC 2019


https://issues.dlang.org/show_bug.cgi?id=20082

--- Comment #7 from kinke <kinke at gmx.net> ---
(In reply to Manu from comment #6)
> Well... there's no way to extern to a struct in that case.
> What's the workaround?

Well, define 'to extern'. How is the missing C++ implementation supposed to be
there at link-time if I'm allocating a struct on the D side and need the dtor?
E.g., is there a dependency on a certain C++ lib when importing your D module,
or is the struct just designed to be allocated on the C++ side and passed by
ref/pointer to the D side? In the latter case, you could annotate the dtor on
the D side with @disable.

--


More information about the Digitalmars-d-bugs mailing list