Shared library: loading doesn't call shared static this
Ellery Newcomer
ellery-newcomer at utulsa.edu
Sat Dec 7 14:55:33 PST 2013
On Saturday, 7 December 2013 at 20:11:15 UTC, Mathias LANG wrote:
afaik, druntime does not officially support the C main, D shared
library use case yet.
If you have only 1 D shared library, you can insert calls to
rt_init and rt_term into shared lib constructors/dtors with gcc.
This has worked for me in pyd:
https://bitbucket.org/ariovistus/pyd/src/32cf9709d711/examples/misc/dmd_sharedlibs/?at=default
You don't want to be calling rt_init or rt_term multiple times,
though.
More information about the Digitalmars-d-learn
mailing list