[Haskell-cafe] Calling Haskell from other languages?

Colin Paul Adams colin at colina.demon.co.uk
Fri Nov 14 03:03:04 EST 2008


>>>>> "Colin" == Colin Paul Adams <colin at colina.demon.co.uk> 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

-- 
Colin Adams
Preston Lancashire


More information about the Haskell-Cafe mailing list