如何在windows上安装Haskell module encoding-0.6.3?

如何在windows上安装Haskell module encoding-0.6.3?,encoding,haskell,Encoding,Haskell,我的操作系统是Windows 7,并使用haskell平台6.12 HaXml和其他依赖项已经安装 我在下载后尝试了以下操作: runHaskell Setup.hs configure 以及: 使用阴谋集团: cabal install encoding 但以上所有文字: * Missing header file: system_encoding.h This problem can usually be solved by installing the system package

我的操作系统是Windows 7,并使用haskell平台6.12

HaXml和其他依赖项已经安装

我在下载后尝试了以下操作:

runHaskell Setup.hs configure 
以及:

使用阴谋集团:

cabal install encoding
但以上所有文字:

* Missing header file: system_encoding.h
This problem can usually be solved by installing the system package that
provides this library (you may need the "-dev" version). If the library is
already installed but in a non-standard location then you can use the flags
--extra-include-dirs= and --extra-lib-dirs= to specify where it is.
我在Cygwin、MINGW和MSDOC上试过,都失败了

在谷歌搜索了很多之后,我发现 (haskll咖啡馆和谷歌集团的内容相同)

他们提到了“langinfo.h”,我在cygwin“/usr/include”下找到了这个文件。 但还是不行


有人在windows上成功安装encoding-0.6.3吗?

我不得不将此作为一个答案发布,以保留格式,尽管它实际上是一个注释,因为我自己不会遵循以下步骤:

您可能会通过libgw32c库在MinGW上安装“langinfo.h”-本页上有一些说明,但它们看起来有侵入性,我不想自己做这些(我希望尽可能保持MSYS的干净):

或者,这里有一个补丁-但是再次阅读评论,这似乎具有侵入性,并且不是我想要运行的东西(我希望我的GHC安装尽可能干净):


为了在Windows上构建它,只需将-f-systemEncoding标志传递给cabal install即可

在某些版本中,Haskell的Windows安装程序有一个错误,无法将一些c头放在正确的位置。我用谷歌搜索了一下,在这个特殊的案例中,Q'n'D解决方案是将
$inst$\libs\
中的
extralibs
目录复制到
$inst$
$inst$
是Haskell平台的安装位置)。
* Missing header file: system_encoding.h
This problem can usually be solved by installing the system package that
provides this library (you may need the "-dev" version). If the library is
already installed but in a non-standard location then you can use the flags
--extra-include-dirs= and --extra-lib-dirs= to specify where it is.