如何在Windows上安装hscurses

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--extra-lib-dirs参数,但它似乎没有找到pdcurses库。

我错过了什么?

1个回答

1

好的,我找到了解决方案

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

不知道为什么--extra-include-dirs--extra-lib-dirs没有起作用。


它在我的情况下仍然没有帮助。还需要其他的帮助吗?https://github.com/skogsbaer/hscurses/issues/22 - NightRa

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接