Having to use -static flag under Win32 with 4.08 & Cygwin 1.1.6

Jeremy Shute shutej@rpi.edu
Sat, 16 Dec 2000 14:34:28 -0500


I've been perusing the documentation looking for what I've done wrong...

1.  I got the latest versions of both Cygwin and GHC.
2.  I installed Cygwin on a clean partition, F:
3.  I installed GHC in /usr/share/ghc/ (on F:, of course)
4.  I copied the Perl binary over to /bin, and pointed the bang in the ghc
script to the location of the binary (I found this a necessary step).
5.  I got a little test program from the web:

module Main where
main = putStrLn "Hello, World!"

6.  Tried to compile said program:

$ ghc main.hs
Output file not specified, defaulting to "main.exe"
gcc: F:/usr/share/ghc/lib/Main.dll_o: No such file or directory
gcc: F:/usr/share/ghc/lib/PrelMain.dll_o: No such file or directory

7.  Confirmed that these files exist nowhere on the partition.  Messed
around some more to no avail, came across static flag and tried that:

$ rm Main.hi main.o
$ ghc -static main.hs
Output file not specified, defaulting to "main.exe"

$ ./main.exe
Hello, World!

8.  Think I'm onto something so look around for an additional installation
step I perhaps did not take, such as building libraries from source shipped
with the distro.  Nope, can't find any.  I can't imagine why that would even
be necessary, to support Win32 on Alphas maybe?

So alas, here I sit frustrated, waiting for comp.lang.functional, and I
figured I'd try you guys.  Has anyone else had this problem?  If not,
perhaps you still have an idea of what's going on?  This would be much

Jeremy Shute