
Hi! I just compiled nhc98, 1.16 with gcc 3.2 on a Red Hat 8.0 system. Everything works fine, but now I tried running nhc. Everytime I ran it - doesn't matter on which program - I got the error message: /usr/local/lib/nhc98/ix86-Linux/Prelude.a(_Driver.o)(.data+0x88): undefined reference to `CF_Main_46main' collect2: ld returned 1 exit status Can you help me, please? Thanks, sonja -- Die naechste WM ist erst 2006.

I got the error message:
/usr/local/lib/nhc98/ix86-Linux/Prelude.a(_Driver.o)(.data+0x88): undefined reference to `CF_Main_46main'
You probably have something like module Test where main = ... But you need to have a module called "Main", containing the function "main", module Main where main = ... Regards, Malcolm

malcolm@cs.york.ac.uk writes:
I got the error message:
/usr/local/lib/nhc98/ix86-Linux/Prelude.a(_Driver.o)(.data+0x88): undefined reference to `CF_Main_46main'
You probably have something like
module Test where main = ...
But you need to have a module called "Main", containing the function "main",
module Main where main = ...
I think, that would be right, if I want to use main. But I just tried out a little programm like module Test where data Foo = Bar and got the error I mentioned above. sonja -- Die naechste WM ist erst 2006.

sonja groening
But you need to have a module called "Main", containing the function "main",
I think, that would be right, if I want to use main. But I just tried out a little programm like module Test where data Foo = Bar and got the error I mentioned above.
The example you give is not a complete Haskell program, because it doesn't contain a function called main. That is why nhc98 gives an error. However, perhaps you really want an interactive environment to try out your incomplete programs. In that case, you want to use 'hi' instead of nhc98 directly. 'hi' provides an interactive prompt for entering expressions and seeing their results, rather like the Hugs or ghci Haskell systems. Regards, Malcolm
participants (3)
-
Malcolm Wallace
-
malcolm@cs.york.ac.uk
-
sonja groening