Readline on Windows?

Koen Claessen koen at cs.chalmers.se
Tue Nov 16 12:16:20 EST 2004


Hi,

Compiling the following program (Bug.hs):

>>>
module Main where

import System.Console.Readline

main =
  do ms <- readline "Hi> "
     print ms
<<<

Using GHC 6.2.2 on Windows XP, using the command line:

  ghc --make Bug -o bug

Produces the following message:

>>>
Chasing modules from: Bug
Compiling Main             ( Bug.hs, Bug.o )
Linking ...
c:/ghc/ghc-6.2.2/libHSreadline.a(Readline__96.o)(.text+0xaa):ghc11748.hc:
undefined reference to `readline'
<<<

Tried linking by hand (not using --make), specifying
-package readline, specifying -lreadline; nothing worked.

/Koen




More information about the Glasgow-haskell-bugs mailing list