English 中文(简体)
Compiling Haskell Code in Cygwin, and some other bugs in Haskell Forum onWindows
原标题:Compiling Haskell code in Cygwin, and some other bugs in Haskell Platform on Windows

我正试图在Haskell汇编一个简便的世界节目,其中附有《2011年Haskell平台》。 如果我装上WinGHCi的法典,并使用《全球倡议》进行汇编,则创建。 然后,我可以从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.

是否还有其他环境变量,我是否需要进口到Cygwin,以便使汇编的+链接在其中发挥作用? 我已将以下二者列入我的Cygwin PATH:2011.2.0.1/lib/extralibs/bin,2011.2.0.1/bin。 (这些是我可在Windows环境变量中看到的仅有两个有效的Haskell相关条目。)

我还注意到Windows环境变量中的一些无效物品(如黑斯凯尔安装的灯泡):

  1. (system var) C/ProgramFiles/Haskell/bin - this dir does not exist because I have installed Haskell in D disk.
  2. (user var) userxxx/ApplicationData/cabal/bin - this dir does not exist.

我试图在HaskellPlatform提交一份比喻报告,但I dont获准这样做。

问题回答

如果无法进入你的发展环境,也无法列举你重新出现的错误,我只能认为,这个问题与你制定<条码”的方法有关。 PATH。

视窗的GHC与自己的<代码>gcc汇编(C代码)和ld链接。 如果您安装了Cygwin,你可能还安装了MinGW仪器链,该仪器有自己的版本gccld。 然后,在Haskell平台双位名录上,你可能把<代码>PATH的可变清单(/usr/bin)放在“Haskell平台双位名录”的道路上,从而使之星联联系人和C汇编者在发现与GHC捆绑在一起的版本之前找到。

你们需要确保在“热带风暴”目录之前列入氢氟烃目录。 不要这样:

$ echo $PATH
/bin:/usr/bin:.../2011.2.0.1/bin

相反,它应当这样做:

$ echo $PATH
.../2011.2.0.1/bin:/bin:/usr/bin

这只是对问题的猜测,你应为更好的诊断提供更多细节。





相关问题
Euler Problem in Haskell -- Can Someone Spot My Error

I m trying my hand at Euler Problem 4 in Haskell. It asks for that largest palindrome formed by multiplying two three-digit numbers. The problem was simple enough, and I thought my Haskell-fu was up ...

How does foldr work?

Can anybody explain how does foldr work? Take these examples: Prelude> foldr (-) 54 [10, 11] 53 Prelude> foldr (x y -> (x+y)/2) 54 [12, 4, 10, 6] 12.0 I am confused about these executions....

Efficient queue in Haskell

How can I efficiently implement a list data structure where I can have 2 views to the head and end of the list, that always point to a head a tail of a list without expensive calls to reverse. i.e: ...

Problem detecting cyclic numbers in Haskell

I am doing problem 61 at project Euler and came up with the following code (to test the case they give): p3 n = n*(n+1) `div` 2 p4 n = n*n p5 n = n*(3*n -1) `div` 2 p6 n = n*(2*n -1) p7 n = n*(5*n -3)...

Ways to get the middle of a list in Haskell?

I ve just started learning about Functional Programming, using Haskel. I m slowly getting through Erik Meijer s lectures on Channel 9 (I ve watched the first 4 so far) and in the 4th video Erik ...

haskell grouping problem

group :: Ord a => [(a, [b])] -> [(a, [b])] I want to look up all pairs that have the same fst, and merge them, by appending all the list of bs together where they have the same a and discarding ...

Closest equivalent to subprocess.communicate in Haskell

I want to do a popen() / python s subprocess.communicate from Haskell - start a program, give it stdin, and get its stdout/stderr. What s the most direct / Haskellish way to do this?

热门标签