【问题标题】:How to install Haskell module encoding-0.6.3 on windows?如何在 Windows 上安装 Haskell 模块 encoding-0.6.3?
【发布时间】:2011-01-15 19:13:43
【问题描述】:

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

HaXml 和其他依赖项已经安装。

下载后我试过了:

runHaskell Setup.hs configure 

和:

runHaskell Setup.hs configure 
--extra-include-dirs=F:/language/langer/haskell/encoding-0.6.3 
--extra-lib-dirs=F:/language/langer/haskell/encoding-0.6.3

并使用阴谋集团:

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 上试过这些,都失败了。

google了很多之后,我找到了this (haskll-cafe 和 google-group 内容相同)

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

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

【问题讨论】:

  • 在某些版本中,Haskell 的 Windows 安装程序存在错误,未能将一些 c-headers 放在正确的位置。我用谷歌搜索,在这种特殊情况下,Q'n'D 解决方案是将$inst$\libs\ 中的目录extralibs 复制到$inst$$inst$ 是安装 Haskell 平台的位置)。

标签: encoding haskell


【解决方案1】:

为了在 Windows 上构建它,将 -f-systemEncoding 标志传递给 cabal install 就足够了

【讨论】:

    【解决方案2】:

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

    您可能可以通过 libgw32c 库在 MinGW 上安装“langinfo.h” - 此页面上有一些说明,但它们看起来具有侵入性,它们不是我自己想做的事情(我喜欢保留MSYS 尽可能干净):

    http://placella.com/software/zenity/

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

    http://dmwit.com/wyvern/encoding_ffi.dpatch

    【讨论】:

      猜你喜欢
      • 2021-11-20
      • 2014-05-03
      • 1970-01-01
      • 1970-01-01
      • 2012-07-22
      • 2011-05-17
      • 2011-01-23
      • 1970-01-01
      • 2018-04-12
      相关资源
      最近更新 更多