ModuleInfo missing
stefv
s1234567 at gmail.Com
Thu Jul 17 19:00:27 UTC 2025
On Thursday, 17 July 2025 at 17:18:04 UTC, Richard (Rikki) Andrew
Cattermole wrote:
> What you are attempting to do is what I refer to as positive
> annotation exportation.
> Where you annotate what you want exported and accessible
> outside the current binary.
>
> This does not work in D for D style code like you have written.
>
> The recommended method is to use what I call negative
> annotation.
>
> By applying the dllimport override switch set to all,
> ``-dllimport=all``, and the visibility modifier switch to
> public ``-visibility=public``.
>
> You will need to set dllimport on both executable and shared
> library. The visibility override switch only needs to be set on
> the shared library.
>
> You will likely also need to set on both executable and shared
> library that you want the shared runtime+phobos via
> ``--link-defaultlib-shared``.
Thank you: it's working.
The flag visibility didn't work with LDC2. I used:
--fvisibility=public
Regards,
Stef
More information about the Digitalmars-d-ide
mailing list