如何在 Cygwin 上构建 Oleo

如何在 Cygwin 上构建 Oleo

我正在尝试安装 Oleo (http://www.gnu.org/software/oleo/) 在 Cygwin 设置上遇到了一些问题。在链接阶段,构建出错,抱怨 ncurses 中未定义的引用。我安装了 libncurses-devel 包。

我运行的构建命令是:

me@mymachine$ CFLAGS="-I/usr/include/ncurses" ./configure
[configure chatter, then success]
me@mymachine$ CFLAGS="-I/usr/include/ncurses" make
[snip successful compile...]
io-curses.o:io-curses.c:(.text+0x1ef8): undefined reference to `_ncwrap_stdscr'
io-curses.o:io-curses.c:(.text+0x1f08): undefined reference to `_wattrset'
io-curses.o:io-curses.c:(.text+0x1f45): undefined reference to `_printw'
io-curses.o:io-curses.c:(.text+0x1f6c): undefined reference to `_printw'
io-curses.o:io-curses.c:(.text+0x1f71): undefined reference to `_ncwrap_stdscr'
io-curses.o:io-curses.c:(.text+0x1f81): undefined reference to `_wattrset'
io-curses.o:io-curses.c:(.text+0x1fa6): undefined reference to `_printw'
io-curses.o:io-curses.c:(.text+0x206c): undefined reference to `_printw'
io-curses.o:io-curses.c:(.text+0x20da): undefined reference to `_printw'
io-curses.o:io-curses.c:(.text+0x21b2): undefined reference to `_printw'
io-curses.o:io-curses.c:(.text+0x21c9): undefined reference to `_ncwrap_stdscr'
io-curses.o:io-curses.c:(.text+0x21df): undefined reference to `_wmove'
io-curses.o:io-curses.c:(.text+0x21ec): undefined reference to `_ncwrap_stdscr'
io-curses.o:io-curses.c:(.text+0x21f4): undefined reference to `_wrefresh'

有谁知道是什么原因导致了这些 ncurses 问题?

答案1

您可能需要将-lcurses-lncurses添加到 CFLAGS 才能成功编译。

相关内容