
7 Feb
2007
7 Feb
'07
6:56 a.m.
SevenThunders wrote:
Another question I have is, is it possible to create a statically linked Haskell library that can be linked using MS VC tools? Also I must say I am a bit confused about the use of the routine __stginit_Bad. Suppose I had multiple Haskell modules each with their own functions to export. Which __stginit_??? routine do I use?
For each module, you invoke this function: void hs_add_root (void (*init_root)(void)); which you can get from HsFFI.h. eg. hs_add_root(__stginit_Foo); hs_add_root(__stginit_Bar); and you do this after calling hs_init(). Cheers, Simon