
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 deeply 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 ac@onehorseshy.com

Try adding "-package base" to your command-line.
--sigbjorn
----- Original Message -----
From: "Andy Serpa"
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 deeply 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 ac@onehorseshy.com _______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
participants (2)
-
Andy Serpa
-
Sigbjorn Finne