[Haskell-cafe] Creating DLLs with GHC

Bulat Ziganshin bulat.ziganshin at gmail.com
Thu Sep 28 06:42:38 EDT 2006


Hello SevenThunders,

Thursday, September 28, 2006, 12:28:45 AM, you wrote:
> Does cabal really work on windows?

i use it since ghc 6.4.2

> Although it's installed I notice that
> when I try to build my library using it, it dies on the first foreign import
> statement in the first .hs source it tries to compile.

i think that it may need -fvia-C. although i'm not sure, try to
prepend this line to module:

{-# OPTIONS_GHC -cpp -fvia-C -fglasgow-exts #-}

> It is reminiscent of
> trying to import a foreign C module directly ghci.  ghc.exe, on the other
> hand has no problem with it.  

look at http://www.haskell.org/library/ArrayRef.tar.gz

the files you need to steal (and edit) are
LICENSE
ArrayRef.cabal
Setup.hs

although for test try to just "make" it



-- 
Best regards,
 Bulat                            mailto:Bulat.Ziganshin at gmail.com



More information about the Haskell-Cafe mailing list