FFI - closure, __stginit
Ondrej Rypacek
ondrej.rypacek@st.mff.cuni.cz
Mon, 29 Jul 2002 12:00:10 +0200
Hi,
I'm just trying the ffi - importing some Haskell function into C. I've got a
module "HelloWorld" with an exported function "add". And I got this
"undefined reference" error while linking:
undefined reference to `HelloWorld_zdfadd_closure'
Can anybody please help me, what's wrong here?
A second problem is the __stginit... function. I've defined
void __stginit_HelloWorld (void) {}
with an empty body. Is this o.k.? Or should I make ghc to generate it for me
somehow?
Thanks a lot, Ondra