2013-09-03 2 views
2

Я пытаюсь установить terminfo Кабалы пакета на моей установке Windows, Cygwin, но это не удается из-за curses заголовок:Установите Haskell Terminfo в Windows,

$ cabal install terminfo 
Resolving dependencies... 
Configuring terminfo-0.3.2.5... 
configure: WARNING: unrecognized options: --with-compiler, --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 ncurses.h usability... no 
checking ncurses.h presence... no 
checking for ncurses.h... no 
checking curses.h usability... no 
checking curses.h presence... no 
checking for curses.h... no 
configure: error: in `/tmp/terminfo-0.3.2.5-620/terminfo-0.3.2.5': 
configure: error: curses headers could not be found, so this package cannot be built 
See `config.log' for more details 
Failed to install terminfo-0.3.2.5 
cabal.exe: Error: some packages failed to install: 
terminfo-0.3.2.5 failed during the configure step. The exception was: 
ExitFailure 1 

В то же время, Ncurses установлен правильно (/usr/include/ncursesw и ncurses). Если перед компиляцией я явно добавить, что вложенную папку для GCC, он переходит

export C_INCLUDE_PATH=/usr/include/ncursesw 

повторный запуск междусобойчик произвел другую ошибку:

... 
checking ncurses.h usability... yes 
checking ncurses.h presence... yes 
checking for ncurses.h... yes 
checking for setupterm in -lncursesw... yes 
configure: creating ./config.status 
config.status: creating terminfo.buildinfo 
configure: WARNING: unrecognized options: --with-compiler, --with-gcc 
cabal.exe: Missing dependency on a foreign library: 
* Missing (or bad) header file: ncurses.h 
* Missing C library: ncursesw 
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. 
If the header file does exist, it may contain errors that are caught by the C 
compiler at the preprocessing stage. In this case you can re-run configure 
with the verbosity flag -v3 to see the error messages. 
Failed to install terminfo-0.3.2.5 
cabal.exe: Error: some packages failed to install: 
terminfo-0.3.2.5 failed during the configure step. The exception was: 
ExitFailure 1 

ответ

2

Так что я попытался cabal install terminfo --extra-lib-dirs=/lib/ncursesw, но потом я понял, что заговорщики является окна приложения, так что я также попытался --extra-lib-dirs=c:/cygwin/lib/ncursesw

В конце концов, окончательное решение выглядит следующим образом:

  1. Установите Cygwin и ncursesw-devel Пакет Там
  2. Run Cygwin и настроить GCC: $ export C_INCLUDE_PATH=/usr/include/ncursesw
  3. Поскольку C:\cygwin\usr\include\ncursesw\ncurses.h мягкая ссылка на Cygwin, вы должны вручную заменить этот файл с curses.h из той же папки
  4. С тот же терминал Cygwin теперь вы можете начать Cabal (это программа для Windows!):

    $ cabal install terminfo --extra-lib-dirs=c:/cygwin/lib --extra-include-dirs=c:/cygwin/usr/include/ncursesw --extra-include-dirs=c:/cygwin/usr/include

Итак, была установлена ​​библиотека. Но когда я пытаюсь использовать эту функцию, ghc жалуется:

Loading package terminfo-0.3.2.5 ... linking ... ghc.exe: c:/cygwin/lib\libncursesw.a: unknown symbol `__imp____ctype_ptr__' 

 Смежные вопросы

  • Нет связанных вопросов^_^