ghci - Compiling Haskell code in Cygwin, and some other bugs in Haskell Platform on Windows -
ghci - Compiling Haskell code in Cygwin, and some other bugs in Haskell Platform on Windows -
i trying compile simple hello world programme in haskell, haskell platform 2011.2.0.1. if load code in winghci, , utilize gui compile, .exe created. can run .exe cygwin.
but if seek compile code in cygwin (using ghc --make
), linker fails. again, if compile windows cmd
prompt, compile+linker works fine.
are there other environment variables need import cygwin, create compile+linker work in it? have set next dirs in cygwin path: 2011.2.0.1/lib/extralibs/bin
, 2011.2.0.1/bin
(these 2 valid haskell related entries see in windows environment variables).
i noticed couple of invalid items in windows environment variables (this looks bug in haskell installation):
(system var)c/programfiles/haskell/bin
- dir not exist because have installed haskell in d disk. (user var) userxxx/applicationdata/cabal/bin
- dir not exist. i tried file bug study in haskellplatform, dont have permission it.
without access development environment or listing of errors you're getting, can assume issue related way you've set path
.
ghc on windows comes bundled own gcc
compiler (for c code) , ld
linker. if you've installed cygwin, you've installed mingw toolchain, comes own version of gcc
, ld
. then, you've made path
variable list /usr/bin
before path haskell platform binary directories, makes ghc
find mingw linker , c compiler before finds versions bundled ghc.
you need create sure hp directories listed before cygwin directories. should not this:
$ echo $path /bin:/usr/bin:.../2011.2.0.1/bin
instead, should this:
$ echo $path .../2011.2.0.1/bin:/bin:/usr/bin
this guess @ issue might be, , should provide more details improve diagnosis.
haskell ghci haskell-platform winghci
Comments
Post a Comment