3

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

我在一个文件夹中下载并提取了 pdcurses ( curses.h, panel.h, pdcurses.dll, pdcurses.lib),然后从 git-bash 控制台运行了这个 cabal 命令:

$ 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即使我使用了and--extra-lib-dirs参数,它看起来也没有选择 pdcurses 库。

我错过了什么?

4

1 回答 1

1

好吧,我找到了解决方案

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

不知道为什么--extra-include-dirs--extra-lib-dirs但没有工作。

于 2013-07-27T21:29:00.847 回答