
colin:
"Colin" == Colin Paul Adams
writes: Colin> And thanks everyone for your help. I have enough to go on Colin> now.
I followed the example at http://www.haskell.org/haskellwiki/Calling_Haskell_from_C
(and renamed the files from A* to fib1*, as I want to pursue this further).
But I get:
fib1.o: In function `main': fib1.c:(.text+0x0): multiple definition of `main' fib1.o:fib1.c:(.text+0x0): first defined here fib1_stub.o: In function `stginit_export_Safe_zdffibonaccizuhszuaDN': fib1_stub.c:(.text+0x5): undefined reference to `Safe_zdffibonaccizuhszuaDN_closure' fib1_stub.o: In function `fibonacci_hs': fib1_stub.c:(.text+0x32): undefined reference to `Safe_zdffibonaccizuhszuaDN_closure' collect2: ld returned 1 exit status
Not linking in the 'Safe' module on the command line? -- Don