
Hello, I'm not subscribed to this list, so please make sure you CC to me if you reply. I just installed nhc98 (from source) and tried to compile a simple program: module Test where main = return () Here is the result: $ nhc98 test.hs /usr/lib/nhc98/ix86-Linux/Prelude.a(_Driver.o)(.data+0x88): undefined reference to `CF_Main_46main' collect2: ld returned 1 exit status $ This is the first "program" I've tried to write in Haskell (although I've used Clean and Miranda before). Did I do something wrong?? -- ----------------- PGP public key at http://wwwkeys.pgp.net:11371/pks/lookup?op=get&search=0x92B5D3F1

Dufflebunk
module Test where main = return ()
Here is the result: $ nhc98 test.hs /usr/lib/nhc98/ix86-Linux/Prelude.a(_Driver.o)(.data+0x88): undefined reference to `CF_Main_46main' collect2: ld returned 1 exit status
The 'main' function must be in a module named 'Main', but your module is named 'Test'. Regards, Malcolm

ons 2002-06-12 klockan 18.41 skrev Dufflebunk:
Hello, I'm not subscribed to this list, so please make sure you CC to me if you reply. I just installed nhc98 (from source) and tried to compile a simple program: module Test where main = return () Here is the result: $ nhc98 test.hs /usr/lib/nhc98/ix86-Linux/Prelude.a(_Driver.o)(.data+0x88): undefined reference to `CF_Main_46main' collect2: ld returned 1 exit status $
This is the first "program" I've tried to write in Haskell (although I've used Clean and Miranda before). Did I do something wrong??
The module containing the main function has to be called Main. Regards, Martin -- Martin Norbäck d95mback@dtek.chalmers.se Kapplandsgatan 40 +46 (0)708 26 33 60 S-414 78 GÖTEBORG http://www.dtek.chalmers.se/~d95mback/ SWEDEN OpenPGP ID: 3FA8580B

Doh! Thanks, that's it. :) On Wed, 2002-06-12 at 12:50, Martin Norbäck wrote:
ons 2002-06-12 klockan 18.41 skrev Dufflebunk:
Hello, I'm not subscribed to this list, so please make sure you CC to me if you reply. I just installed nhc98 (from source) and tried to compile a simple program: module Test where main = return () Here is the result: $ nhc98 test.hs /usr/lib/nhc98/ix86-Linux/Prelude.a(_Driver.o)(.data+0x88): undefined reference to `CF_Main_46main' collect2: ld returned 1 exit status $
This is the first "program" I've tried to write in Haskell (although I've used Clean and Miranda before). Did I do something wrong??
The module containing the main function has to be called Main.
Regards,
Martin
-- Martin Norbäck d95mback@dtek.chalmers.se Kapplandsgatan 40 +46 (0)708 26 33 60 S-414 78 GÖTEBORG http://www.dtek.chalmers.se/~d95mback/ SWEDEN OpenPGP ID: 3FA8580B --
----------------- PGP public key at http://wwwkeys.pgp.net:11371/pks/lookup?op=get&search=0x92B5D3F1
participants (3)
-
Dufflebunk
-
Malcolm Wallace
-
Martin Norbäck