fully qualifed IR names causes problems of mismatched definitions
kinke
noone at nowhere.com
Thu Sep 30 06:04:46 UTC 2021
On Wednesday, 29 September 2021 at 23:53:44 UTC, Basile B. wrote:
> too bad for me, firstly detected in 2016 so probably hard to
> fix.
It's not trivial to fix, but the main reason is that users
shouldn't declare structs in different modules and expect them to
somehow be magically folded so a single common type (`extern(C)`
has no effect in this regard). Opaque declarations are no
exception.
You can work around it for the time being by compiling each
module to a separate object file - e.g., by creating a static lib
via -lib, or compiling with -c (without -of) and then linking
manually.
More information about the digitalmars-d-ldc
mailing list