I am trying to compile a simple hello world program in Haskell, with Haskell Platform 2011.2.0.1. If I load the code in WinGHCi, and use the GUI to compile, the .exe is created. Then I can run the .exe from Cygwin.
But if I try to compile the code in Cygwin (using ghc --make
), linker fails. But again, if I compile from the Windows cmd
prompt, then the compile+linker works fine.
Are there any other environment variables I need to import into Cygwin, to make the compile+linker work in it? I have put the following dirs in my Cygwin PATH: 2011.2.0.1/lib/extralibs/bin
, 2011.2.0.1/bin
(these are the only two valid Haskell related entries that I could see in the Windows environment variables).
I also noticed a couple of invalid items in the Windows environment variables (this looks like a bug in the Haskell installation):
- (system var)
C/ProgramFiles/Haskell/bin
- this dir does not exist because I have installed Haskell in D disk. - (user var)
userxxx/ApplicationData/cabal/bin
- this dir does not exist.
I tried to file a bug report in HaskellPlatform, but I dont have permission to do it.