如何在Windows上安装hscurses

时间:2013-07-27 20:12:46

标签: windows haskell cabal curses pdcurses

我正在尝试在Windows 7上安装hscurses。从自述文件中,它依赖于pdcurses。

我在文件夹中下载并提取了pdcurses(curses.hpanel.hpdcurses.dllpdcurses.lib),然后从git-bash控制台运行了此cabal命令:< / p>

$ cabal install hscurses --extra-include-dirs=/c/Code/Haskell/pdcurses --extra-lib-dirs=/c/Code/Haskell/pdcurses/

但它失败了以下输出:

Resolving dependencies...
Configuring hscurses-1.4.1.2...
configure: WARNING: unrecognized options: --with-gcc
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for addnstr in -lcurses... no
checking for addnstr in -lncurses... no
checking for waddnwstr in -lncursesw... no
checking for addnstr in -lpdcurses... no
checking for waddnwstr in -lpdcursesw... no
checking for iconv in -liconv... no
checking for libiconv in -liconv... no
checking for libiconv... no
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking iconv.h usability... no
checking iconv.h presence... no
checking for iconv.h... no
checking curses.h usability... no
checking curses.h presence... no
checking for curses.h... no
checking ncurses.h usability... no
checking ncurses.h presence... no
checking for ncurses.h... no
checking ncursesw/ncurses.h usability... no
checking ncursesw/ncurses.h presence... no
checking for ncursesw/ncurses.h... no
checking locale.h usability... yes
checking locale.h presence... yes
checking for locale.h... yes
checking langinfo.h usability... no
checking langinfo.h presence... no
checking for langinfo.h... no
checking wchar.h usability... yes
checking wchar.h presence... yes
checking for wchar.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking signal.h usability... yes
checking signal.h presence... yes
checking for signal.h... yes
configure: creating ./config.status
config.status: creating hscurses.buildinfo
config.status: creating cbits/config.h
configure: WARNING: unrecognized options: --with-gcc
cabal.exe: Missing dependency on a foreign library:
* Missing C library: curses
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.
Failed to install hscurses-1.4.1.2
cabal.exe: Error: some packages failed to install:
hscurses-1.4.1.2 failed during the configure step. The exception was:
ExitFailure 1

即使我使用--extra-include-dirs--extra-lib-dirs参数,看起来它还没有拿起pdcurses库。

我缺少什么?

1 个答案:

答案 0 :(得分:1)

我找到了解决方案

$ export LIBRARY_PATH=/c/Code/Haskell/pdcurses
$ export C_INCLUDE_PATH=/c/Code/Haskell/pdcurses

不知道为什么--extra-include-dirs--extra-lib-dirs无效。