首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Linux交叉编译库

Linux交叉编译库
EN

Stack Overflow用户
提问于 2016-06-28 14:21:26
回答 1查看 961关注 0票数 1

我尝试使用Linaro为我的ARM板交叉编译"nano-2.5.3“程序。我的构建平台是linux ubuntu 12.04。我使用以下命令

代码语言:javascript
复制
export PATH=$PATH:/project/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/bin
export CROSS_COMPILE=arm-linux-gnueabihf-
export ARCH=arm

./configure --host=arm-linux-gnueabihf --prefix=/project/nano

每件事都很顺利,然后我尝试使用make

代码语言:javascript
复制
make

在此之后会出现一个错误:

代码语言:javascript
复制
/usr/include/ncursesw/curses.h:60:34: fatal error: ncursesw/ncurses_dll.h: No such file or directory

因此,我使用交叉编译器在路径"/project/ ncurses“中编译了一个ncurses库,并添加了include:

代码语言:javascript
复制
export  CPPFLAGS=-I/project/ncurses/include/ncurses

然后再来一次。但不幸的是,我尝试了所有的方法,但是交叉编译器一直在检查原始路径,这里是完整的错误文本:

代码语言:javascript
复制
make  all-recursive
make[1]: Entering directory `/project/nano-2.5.3'
Making all in doc
make[2]: Entering directory `/project/nano-2.5.3/doc'
Making all in man
make[3]: Entering directory `/project/nano-2.5.3/doc/man'
make  all-recursive
make[4]: Entering directory `/project/nano-2.5.3/doc/man'
Making all in fr
make[5]: Entering directory `/project/nano-2.5.3/doc/man/fr'
make  all-am
make[6]: Entering directory `/project/nano-2.5.3/doc/man/fr'
make[6]: Nothing to be done for `all-am'.
make[6]: Leaving directory `/project/nano-2.5.3/doc/man/fr'
make[5]: Leaving directory `/project/nano-2.5.3/doc/man/fr'
make[5]: Entering directory `/project/nano-2.5.3/doc/man'
make[5]: Nothing to be done for `all-am'.
make[5]: Leaving directory `/project/nano-2.5.3/doc/man'
make[4]: Leaving directory `/project/nano-2.5.3/doc/man'
make[3]: Leaving directory `/project/nano-2.5.3/doc/man'
Making all in texinfo
make[3]: Entering directory `/project/nano-2.5.3/doc/texinfo'
make  all-am
make[4]: Entering directory `/project/nano-2.5.3/doc/texinfo'
make[4]: Nothing to be done for `all-am'.
make[4]: Leaving directory `/project/nano-2.5.3/doc/texinfo'
make[3]: Leaving directory `/project/nano-2.5.3/doc/texinfo'
Making all in syntax
make[3]: Entering directory `/project/nano-2.5.3/doc/syntax'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/project/nano-2.5.3/doc/syntax'
make[3]: Entering directory `/project/nano-2.5.3/doc'
make[3]: Nothing to be done for `all-am'.
make[3]: Leaving directory `/project/nano-2.5.3/doc'
make[2]: Leaving directory `/project/nano-2.5.3/doc'
Making all in m4
make[2]: Entering directory `/project/nano-2.5.3/m4'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/project/nano-2.5.3/m4'
Making all in po
make[2]: Entering directory `/project/nano-2.5.3/po'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/project/nano-2.5.3/po'
Making all in src
make[2]: Entering directory `/project/nano-2.5.3/src'
arm-linux-gnueabihf-gcc -DHAVE_CONFIG_H -I. -I..  -DLOCALEDIR=\"/project/nano/share/locale\" -DSYSCONFDIR=\"/project/nano/etc\" -I/usr/include/ncursesw -I/project/ncurses/include/ncurses  -g -O2 -Wall -MT browser.o -MD -MP -MF .deps/browser.Tpo -c -o browser.o browser.c
In file included from nano.h:93:0,
                 from proto.h:27,
                 from browser.c:25:
/usr/include/ncursesw/curses.h:60:34: fatal error: ncursesw/ncurses_dll.h: No such file or directory
compilation terminated.
make[2]: *** [browser.o] Error 1
make[2]: Leaving directory `/project/nano-2.5.3/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/project/nano-2.5.3'
make: *** [all] Error 2
EN

回答 1

Stack Overflow用户

发布于 2016-06-28 16:53:40

找到了!问题出在库名称的相似性上。我编译了"ncurses“库,但当我搜索时,库的名称是"ncursesw"!非常相似。但事实并非如此。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/38068454

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档