Hello , ghc 6.12.3. i use the following code to initialize my haskell dll:
extern "C" { #include "HsFFI.h" void __stginit_Main(); void haskell_init (void) { static bool initialized = FALSE; if (!initialized) { initialized = TRUE; hs_init(NULL, NULL); hs_add_root(__stginit_Main); } } } but it crashes on hs_add_root call. what may be source of problem? without hs_add_root, it works ok, but crashes on multiple calls from C to haskell functions, probably due to GC of "unused" code :) -- Best regards, Bulat mailto:bulat.zigans...@gmail.com _______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users