[Haskell-cafe] Building shared library to be called from C

Henk-Jan van Tuyl hjgtuyl at chello.nl
Sun Apr 17 23:14:46 UTC 2016


On Thu, 07 Apr 2016 18:52:39 +0200, Jack Hill <jackhill at jackhill.us> wrote:

:
>
> If I try "ghc maint.c -lhfact" I get:
>
> /tmp/ghc19146_0/ghc_4.o: In function `main':
> ghc_3.c:(.text+0x0): multiple definition of `main'
> maint.o:maint.c:(.text+0x0): first defined here
> /tmp/ghc19146_0/ghc_4.o: In function `main':
> ghc_3.c:(.text+0x61): undefined reference to `ZCMain_main_closure'
> collect2: error: ld returned 1 exit status
>
> How should I be calling Haskell from C?

Maybe this helps:
     https://wiki.haskell.org/Calling_Haskell_from_C

Regards,
Henk-Jan van Tuyl


-- 
Folding at home
What if you could share your unused computer power to help find a cure? In
just 5 minutes you can join the world's biggest networked computer and get
us closer sooner. Watch the video.
http://folding.stanford.edu/


http://Van.Tuyl.eu/
http://members.chello.nl/hjgtuyl/tourdemonad.html
Haskell programming
--


More information about the Haskell-Cafe mailing list