[Haskell-cafe] Strange type behavior in GHCi 6.4.2

Kirsten Chevalier catamorphism at gmail.com
Sat Dec 30 14:01:38 EST 2006

On 12/30/06, Grady Lemoine <grady.lemoine at gmail.com> wrote:
> I tried compiling, but I got a linker error:
> /usr/lib/ghc-6.4.2/libHSrts.a(Main.o): In function `main':
> (.text+0x2): undefined reference to `__stginit_ZCMain'
> /usr/lib/ghc-6.4.2/libHSrts.a(Main.o): In function `main':
> (.text+0x16): undefined reference to `ZCMain_main_closure'
> collect2: ld returned 1 exit status

You need to either define a "main" function in your module (e.g.,
"main = putStrLn "Hello world!") or add -c to your compile flags.


Kirsten Chevalier* chevalier at alum.wellesley.edu *Often in error, never in doubt
"I wanna live for life and no other / cause I don't ever wanna be like my mother
I wanna learn to walk on the water / cause I don't wanna be like my father"
-- Noe Venable

More information about the Haskell-Cafe mailing list