如何在Windows上安装Haskell模块encoding-0.6.3?
我的操作系统是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:
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-cafe和google-group有相同的内容)
他们提到了“langinfo.h”,我在cygwin“/usr/include”下找到了这个文件。 但仍然不起作用。
有人在Windows上成功安装encoding-0.6.3吗?
My os is Windows 7, and with haskell platform 6.12
HaXml and other dependencies have already installed.
I tried to this after download:
runHaskell Setup.hs configure
and:
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
and use cabal:
cabal install encoding
but all above print:
* 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.
i've tried these on Cygwin and MINGW and MSDOC, all failed.
After googled a lot , i found this
(haskll-cafe and google-group have the same content)
they mentioned the "langinfo.h", i found this file under cygwin "/usr/include" .
but still doesn't work.
Anyone install encoding-0.6.3 successfully on windows ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
为了在 Windows 上构建它,将 -f-systemEncoding 标志传递给 cabal install 就足够了
In order to build it on Windows it's enough to pass -f-systemEncoding flag to cabal install
我不得不将其作为答案发布以保持格式,尽管它实际上是一条评论,因为我自己不会遵循这些步骤:
潜在地你可以通过 libgw32c 库在 MinGW 上安装“langinfo.h” - 有本页上有一些说明,但它们看起来具有侵入性,而且我不想自己做这些事情(我喜欢尽可能保持 MSYS 干净):
http://placella.com/software/zenity/
或者,这里有一个补丁 - 但再次阅读评论似乎是侵入性的,不是我想要的运行(我喜欢让我的 GHC 安装尽可能干净):
http://dmwit.com/wyvern/编码_ffi.dpatch
I've had to post this as an answer to keep the formatting though it is really a comment, as I wouldn't follow these steps myself:
Potentially you can get "langinfo.h" installed on MinGW via the libgw32c library - there are some instructions on this page, but they look invasive and they aren't something I'd want to do myself (I like to keep MSYS as clean as possible):
http://placella.com/software/zenity/
Alternatively there is a patch here - but reading the comments this again seems invasive and isn't something I'd want to run (I like to keep my GHC installs as clean as possible):
http://dmwit.com/wyvern/encoding_ffi.dpatch