ARM 移植;
移植简单来讲就是使用ARM的编译环境,重新编译一份ARM平台上可以使用的库或执行文件,一般只需要重新制定C编译器和C++编译器即可。
特别注意的地方:
不能从windows解压文件后再把整个文件夹拷贝过去,然后再执行后面的,否则会有很多的问题,必须把压缩文件拷贝过去,在linux平台解压;
具体原因:
1.文件的读写权限在windows解压后会丢失;
2.文件的格式可能变成windows格式;
系统环境:Ubuntu 14.04.3 LTS
源码:libevent-2.0.22-stable.tar.gz
交叉编译环境:arm-none-linux-gnueabi-
[[email protected]]# tar -zxvf libevent-2.0.22-stable.tar.gz
[[email protected]]# cd libevent-2.0.22-stable/
[[email protected]]# ./configure --prefix=/home/ADS/libevent --host=arm-none-linux CC=arm-none-linux-gnueabi-gcc CXX=arm-none-linux-gnueabi-g++
[[email protected]]# make
[[email protected]]# make install
生成成功
交叉编译后的文件在/home/zhaojq/libevent目录下
[[email protected] libevent]# ls
bin include lib
libevent头文件在include目录
[[email protected] libevent/include]# ls
evdns.h event2 event.h evhttp.h evrpc.h evutil.h
交叉编译后的动态库文件在lib目录
[[email protected] libevent/lib]# ls
libevent-2.0.so.5 libevent_extra-2.0.so.5.1.9 libevent_openssl.so
libevent-2.0.so.5.1.9 libevent_extra.a libevent_pthreads-2.0.so.5
libevent.a libevent_extra.la libevent_pthreads-2.0.so.5.1.9
libevent_core-2.0.so.5 libevent_extra.so libevent_pthreads.a
libevent_core-2.0.so.5.1.9 libevent.la libevent_pthreads.la
libevent_core.a libevent_openssl-2.0.so.5 libevent_pthreads.so
libevent_core.la libevent_openssl-2.0.so.5.1.9 libevent.so
libevent_core.so libevent_openssl.a pkgconfig
libevent_extra-2.0.so.5 libevent_openssl.la
原文地址:https://www.cnblogs.com/gwwdq/p/9339714.html