Dynamic libraries, again
Jacob Carlborg
doob at me.com
Sun Mar 14 15:23:00 PDT 2010
I've been working the whole day on getting Tango to work built as a
dynamic library with dmd on Mac OS X. I have one problem (for now) that
I can't seem to solve.
The problem is that the module constructors are not called. That is
because the module info array in the object module, which contains all
the module constructors that should be called, is (almost) empty. It
seems like that the compiler or the linker doesn't put the module
constructors that are dynamically linked into the executable. I've also
tried to move the _minfo_beg and _minfo_end variables, which are the
beginning and the end of the sections containing the module info array,
from the object module to a statically linked module and then passed
them as arguments to the _moduleCtor function but without any success.
Does anyone have any idea have to solve the above problem? Does the
compiler need to be modified?
/Jacob Carlborg
More information about the Digitalmars-d
mailing list