未定义的参考建筑ncurses在cygwin上

时间:2012-01-21 20:33:27

标签: windows cygwin ncurses

Windows XP:

我最终想安装DDD(调试器)。它不适用于Windows的二进制形式。当我得到它的源并试图配置它时,它抱怨没有术语大写库存在。所以我获得了ncurses并在使用Cygwin Terminal进行了大部分成功的构建之后得到了这个:

../lib/libncurses.a(lib_ttyflags.o)(.text+0x41):lib_ttyflags.c: undefined reference to `_nc_mingw_ioctl'
../lib/libncurses.a(lib_ttyflags.o)(.text+0xd1):lib_ttyflags.c: undefined reference to `_nc_mingw_ioctl'

1 个答案:

答案 0 :(得分:5)

当我这样做时,它对我有用:

configure --enable-term-driver --enable-sp-funcs
make

“mingw”需要--enable-term-driver(我在msys上测试过,但这在cygwin上同样适用),而--enable-term-driver需要--enable-sp-funcs。

          --enable-sp-funcs
                  compile-in  support  for  extended  functions which
                  accept  a  SCREEN  pointer,  reducing  the need for
                  juggling  the  global  SP  value  with set_term and
                  delscreen.

          --enable-term-driver
                  compile  with  terminal-driver. That is used in the
                  MinGW  port,  and (being somewhat more complicated)
                  is  an experimental alternative to the conventional
                  termlib   internals.  Currently,  it  requires  the
                  sp-funcs feature to be enabled.

见这里:http://lists.gnu.org/archive/html/info-gnu/2011-02/msg00020.html