[Issue 23850] Differentiate between a module that is in binary vs outside of binary when including -I

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Jul 10 09:54:40 UTC 2023


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

--- Comment #4 from Richard Cattermole <alphaglosined at gmail.com> ---
I have unfortunately hit a problem with LDC. There was a type declared in a
-betterC DLL, this type had its __initZ symbol exported. It was referenced by a
TypeInfo generated for an executable that depended on that DLL. The __initZ
symbol was undefined. This situation was very easy to trigger.

The workaround was to use the dllimport override flag in the executable to
force it to see the __initZ symbol. Of course, this means users of my code will
have to manually add this switch.

My proposal for this switch, would have allowed dllimport mode to be placed
upon the DLL module, as it was known to be external to the binary.

This gives me more confidence in saying, this will be a requirement if we ever
want to get shared library support to 100% and not require the override
switches to be used under normal circumstances.

https://github.com/ldc-developers/ldc/issues/4434

--


More information about the Digitalmars-d-bugs mailing list