开发者

How to install Haskell module encoding-0.6.3 on windows?

开发者 https://www.devze.com 2023-02-04 05:00 出处:网络
My os is Windows 7, and with haskell platform 6.12 HaXml and other dependencies have already installed.

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 suc开发者_如何学Gocessfully on windows ?


In order to build it on Windows it's enough to pass -f-systemEncoding flag to cabal install


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

0

精彩评论

暂无评论...
验证码 换一张
取 消