So I tried cabal install terminfo --extra-lib-dirs=/lib/ncursesw
, but then I realized that cabal is a windows app, so I've also tried --extra-lib-dirs=c:/cygwin/lib/ncursesw
In the end, final solution is as follows:
- Install Cygwin and
ncursesw-devel
package there - Run cygwin and configure GCC:
$ export C_INCLUDE_PATH=/usr/include/ncursesw
- Since
C:\cygwin\usr\include\ncursesw\ncurses.h
is a soft-reference in Cygwin, you should manually replace this file withcurses.h
from the same folder From the same Cygwin terminal you can now start Cabal (it's a Windows program!):
$ cabal install terminfo --extra-lib-dirs=c:/cygwin/lib --extra-include-dirs=c:/cygwin/usr/include/ncursesw --extra-include-dirs=c:/cygwin/usr/include
So, the library was installed. But when I try to actually use that function, ghc complains:
Loading package terminfo-0.3.2.5 ... linking ... ghc.exe: c:/cygwin/lib\libncursesw.a: unknown symbol `__imp____ctype_ptr__'