On Tuesday, 2 March 2021 at 10:00:46 UTC, Imperatorn wrote:
On Tuesday, 2 March 2021 at 00:40:06 UTC, Pillager86 wrote:
What is the correct multi-platform way to build one dub
project as a shared library, and load said shared library in a
separate dub project? So far I am able to load a shared
library and run a function from it (had to extern(C) it to get
the symbol to load) by using "targetType":"dynamicLibrary" in
the shared library project, but the main program exits with
code -11 and if I don't unload the library manually I get a
weird "Aborting from src/rt/sections_elf_shared.d(500) DSO
being unregistered isn't current last one.Program exited with
code -6" error that Google knows nothing about.
[...]
https://www.flipcause.com/secure/cause_pdetails/ODcyMDE=
I see the problem now. On Linux I can load a ScriptFunction into
the Interpreter instance and run it. On Windows, it crashes with
invalid memory access. How sad. DMildew modules will be a
POSIX-only feature and that's OK because more people need to
adopt other OS besides Windows, which was created by a psychopath
anyway.