Problem with linker on Windows 2000

Sigbjorn Finne sof@galois.com
Sat, 19 Jan 2002 10:48:18 -0800


Hi,

the linker is telling you,  in a not too user-friendly a way,
that your program is missing a module Main which exports
'main', which is Haskell's convention for the 'entry point'
to a program.

So, instead of "Hello()" try  "Main" (or "Main(main)")

hth
--sigbjorn

----- Original Message -----
From: "Martin Fowler" <fowler@acm.org>
To: <glasgow-haskell-users@haskell.org>
Sent: Saturday, January 19, 2002 10:37
Subject: Problem with linker on Windows 2000


> I seem to having a problem in the link phase using ghc 5.02.2
>
> It seems to occur with any program, this one is:
>
> module Hello() where
> main = putStr "Hello World\n"
>
> The error message is
>
> f:/apps/ghc/libHSstd.a(PrelMain__1.o)(.text+0x16):ghc1780.hc: undefined
reference to `__stginit_Main'
> f:/apps/ghc/libHSstd.a(PrelMain__2.o)(.text+0x4):ghc1780.hc: undefined
reference to `Main_main_closure'
> f:/apps/ghc/libHSstd.a(PrelMain__2.o)(.text+0x2f):ghc1780.hc: undefined
reference to `Main_main_closure'
>