尝试使用arm-linux-gnueabi-gcc编译nano

时间:2017-01-21 17:32:03

标签: c linux ncurses nano

我正在尝试交叉编译ARM的NANO文本编辑器。我正在运行Ubuntu,并使用arm-linux-gnueabi工具链。

我用sudo apt-get install gcc-arm-linux-gnueabi安装了arm-linux-gnueabi。然后我从GNU档案中下载并解开了nano 2.26的来源。之后,我跑了./configure。以下是完整语法:

./configure --host=arm-linux-gnueabi --prefix=/usr

一切都很好,除了这一部分:

...
checking ncurses.h usability... yes
checking ncurses.h presence... yes
checking for ncurses.h... yes
checking for get_wch in -lncursesw... no
checking for initscr in -lncurses... no
checking curses.h usability... yes
checking curses.h presence... yes
checking for curses.h... yes
checking for get_wch in -lcurses... no
checking for initscr in -lcurses... no
configure: WARNING:
*** No curses lib available.  Consider getting the official ncurses
*** distribution from ftp://ftp.gnu.org/pub/gnu/ncurses if you get
*** errors compiling nano.

这对我来说没有意义,因为我之前安装了libncurses5-devlibncursesw5-dev(通过apt-get),所以我忽略它并运行make。

它抛出了一些关于未定义引用的错误。这是部分:

...
arm-linux-gnueabi-gcc  -g -O2   -o nano browser.o chars.o color.o cut.o files.o global.o help.o move.o nano.o prompt.o rcfile.o search.o text.o utils.o winio.o 
...
winio.o: In function `edit_draw':
/home/red/nano-2.2.6/src/winio.c:2486: undefined reference to `wmove'
/home/red/nano-2.2.6/src/winio.c:2486: undefined reference to `waddnstr'
/home/red/nano-2.2.6/src/winio.c:2517: undefined reference to `wattr_on'
/home/red/nano-2.2.6/src/winio.c:2735: undefined reference to `wmove'
/home/red/nano-2.2.6/src/winio.c:2735: undefined reference to `waddnstr'
/home/red/nano-2.2.6/src/winio.c:2749: undefined reference to `wattr_off'
/home/red/nano-2.2.6/src/winio.c:2750: undefined reference to `wattr_off'
/home/red/nano-2.2.6/src/winio.c:2818: undefined reference to `wattr_on'
/home/red/nano-2.2.6/src/winio.c:2819: undefined reference to `wmove'
/home/red/nano-2.2.6/src/winio.c:2819: undefined reference to `waddnstr'
/home/red/nano-2.2.6/src/winio.c:2821: undefined reference to `wattr_off'
/home/red/nano-2.2.6/src/winio.c:2516: undefined reference to `wattr_on'
/home/red/nano-2.2.6/src/winio.c:2715: undefined reference to `wmove'
/home/red/nano-2.2.6/src/winio.c:2715: undefined reference to `waddnstr'
/home/red/nano-2.2.6/src/winio.c:2562: undefined reference to `wmove'
/home/red/nano-2.2.6/src/winio.c:2562: undefined reference to `waddnstr'
/home/red/nano-2.2.6/src/winio.c:2591: undefined reference to `wmove'
/home/red/nano-2.2.6/src/winio.c:2591: undefined reference to `waddnstr'
/home/red/nano-2.2.6/src/winio.c:2597: undefined reference to `wmove'
/home/red/nano-2.2.6/src/winio.c:2597: undefined reference to `waddnstr'
/home/red/nano-2.2.6/src/winio.c:2672: undefined reference to `wmove'
/home/red/nano-2.2.6/src/winio.c:2672: undefined reference to `waddnstr'
/home/red/nano-2.2.6/src/winio.c:2670: undefined reference to `COLS'
...

它以类似的方式继续下去。可能是什么原因/如何修复它?任何帮助表示赞赏。

0 个答案:

没有答案