
Hi,
I was playing with dynamically loaded modules and had the same problem.
It has nothing to do with shared objects. What you have to do is to
force
the main program (the one that loads the loadable modules) to explicitly
link all of the object files that the set {<main program>, <loadable
modules>}
depends on.
For example, if a module depends on symbols in
On Thu, Apr 29 2004, Alastair Reid wrote:
Does passing the flag RTLD_GLOBAL to dlopen help? (man dlopen for info about this flag)
No, since none of the objects involved are shared objects (I use neither dlopen or addDLL but the loadObj function). They are just compiled Haskell modules and the problem lies in the RTS symbols which for some reason can't be loaded dynamically (why it doesn't work when the base package etc. can be loaded is beyond me).
However when loading shared objects your flag is the one to use. That works without flaw and is really a nicer way to load shared objects than the RTS function addDLL.
/Hampus
-- Homepage: http://www.dtek.chalmers.se/~d00ram E-mail: d00ram@dtek.chalmers.se
"Det är aldrig försent att ge upp" _______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users