Win32 dlls -- how to do it?

Sigbjorn Finne
Fri, 27 Jun 2003 11:08:03 -0700

Try adding "-package base" to your command-line.


----- Original Message ----- 
From: "Andy Serpa" <>
To: <>
Sent: Friday, June 27, 2003 10:31
Subject: Win32 dlls -- how to do it?

> Hello,
> New to Haskell, new to GHC.  My initial intention in picking up Haskell is
to be able
> to write some functions in Haskell and then compile them into .dlls for
Win32 that I
> can call from programs written in other languages.  So before I get too
> invested I want to make sure that is possible.
> So I tried following the example in the GHC docs about generating a .dll
to be
> called from external programs in another language, but it does not compile
> correctly.  I tried using the *EXACT* files specified in section 11.4.4.
of the GHC
> manual.  The Adder module compiles fine (& produces the extra stub), but
> "DllMain.c" gives a (single) warning, and the final step:
> ghc --mk-dll -o adder.dll adder.o adder_stub.o dllMain.o
> fails with a whole slew of errors.  I'm using GHC 6.0.
> Andy Serpa
> _______________________________________________
> Glasgow-haskell-users mailing list