Haskell calling D code through the FFI

David Soria Parra via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Aug 5 14:28:07 PDT 2014


On Monday, 4 August 2014 at 20:48:09 UTC, Jon wrote:

> For reasons I don't completely understand, you also need a fake 
> main function, dummy.d:
>
>     void main(){}
>

Note that this is not necessary if you compile with -lib e.g.:

   dmd -lib -oflibtest.a test.d

and then

   ghc Main.hs --make -omain libtest.a

I don't have gdc or ldc installed but as far as I know ldc has a 
-lib flag as well.


More information about the Digitalmars-d-learn mailing list