Big picture on shared libraries when they go wrong, how?
Atila Neves
atila.neves at gmail.com
Thu May 9 22:04:29 UTC 2024
On Monday, 6 May 2024 at 03:28:47 UTC, Richard (Rikki) Andrew
Cattermole wrote:
> This post is meant to be a highly enlightening and entertaining
> explanation (or should I say it shouldn't cure anyones
> insomnia) of just how many things can go wrong with shared
> libraries if they are not worked with right regardless of
> platform.
>
> [...]
There were a few things here I didn't understand; sometimes whole
sentences. I don't know what "siblings shared libraries" are, and
"intermediary static libraries" only made sense to me further
down when I understood that it was about linking several static
libraries into a dynamic one.
Some questions:
On everything druntime-related, how is it done in C++? C (unless
freestanding) and C++ both have runtimes despite some people
pretending otherwise.
"you cannot tell the compiler that a module is not in your
binary." - isn't this exactly what happens with `export` on a
declaration (as opposed to a definition)? That is, my
understanding is that `export` with no body means `dllimport` and
`export` with a body means `dllexport`.
Where does the need for "private but export" come from again? Is
there an equivalent in C++ (`static dllexport`?), or does this
only happen due to something specific to D like `T.init`?
"By not exporting ModuleInfo and assuming it is available the
compiler introduces a hidden dependency on a generated symbol
that may not exist." - do we have an issue for that? I searched
for ModuleInfo in the issues but none of them looked like a match
to me.
More information about the Digitalmars-d
mailing list