昨天看过http://www.eefocus.com/ayayayaya/blog/2012-07/191909_97153.html的一篇文章,在移植lynx时出错,在src中make说要以来LYHelp.h文件,然后回到主目录make依然出错了,于是乎下载了一个新版本的lynx与ncurses
ncures地址:http://download.chinaunix.net/download/0008000/7242.shtml
lynx地址:http://lynx.isc.org/lynx2.8.7/index.html
主机环境:UBUNTU10.10
开发板环境:OK6410
1、移植ncurses
编译ncurses是比较简单的
./configure CC=arm-none-linux-gnueabi-gcc --host=arm-linux --prefix=/home/linux/project/lynx-browser/ncurses
之后make&&make install
因为是参考了前面的文章,所以目录也就没改变
2.编译lynx
之前编译lynx出现ncurses headers files not found,很恼火
应该是ncurses头文件指定问题,后来发现时格式不对,姑且这么认为吧
后修改如下
./configure CC=arm-none-linux-gnueabi-gcc --prefix=/home/linux/project/lynx-browser/lynx --host=arm-linux CPPFLAGS="-I /home/linux/project/lynx-browser/ncurses/include/ncurses" CPPFLAGS="-I /home/linux/project/lynx-browser/ncurses/include/" LDFLAGS="-L /home/linux/project/lynx-browser/ncurses/lib"
生成makefile文件
修改makefile文件
CFLAGS = -O2 -I/home/linux/project/lynx-browser/ncurses/include/ncurses -I/home/linux/project/lynx-browser/ncurses/include/ncurses
LIBS = -lncurses -L/home/linux/project/lynx-browser/ncurses/lib
不进去src目录
make
make install
啊,搞定了,
3.文件copy
将编译好的文件目录即/home目录拷贝到板子的主目录下,运行我们lynx目录下的bin/lynx www.kernel.org
结果如下: