poco-1.9.3 交叉编译

下载地址

https://github.com/pocoproject/poco/releases
以上链接下,有各个版本的源码下载。

编译环境

Ubuntu 18.04.3 LTS

编译配置

假设:

  • 交叉编译工具:arm-linux-
    使用的交叉编译工具版本信息如下:
    Target: arm-linux-gnueabi
    Configured with: --target=arm-linux-gnueabi --enable-threads --disable-libmudflap --disable-libssp --disable-libstdcxx-pch --with-gnu-as --with-gnu-ld --enable-languages=c,c++ --enable-shared --enable-lto --enable-symvers=gnu --enable-__cxa_atexit --disable-nls --enable-clocale=gnu --enable-libgomp --disable-libitm --enable-poison-system-directories 
    Thread model: posix
    gcc version 6.3.0 
    
  • 交叉编译结果安装目录:/home/user/cross-compile/

编译配置如下:
./configure --prefix=/home/user/cross-compile/poco --config=ARM-Linux --minimal --static --shared --no-tests --no-samples

  • –prefix:指定安装目录
  • –config=ARM-Linux:指定编译使用的配置文件
  • –shared:编译生成.so动态库
  • –static:编译生成.a静态库
    以上配置为最小化编译,仅编译如下库:
  • PocoEncodings
  • PocoFoundation
  • PocoJSON
  • PocoNet
  • PocoRedisd
  • PocoUtil
  • PocoXML
    如果需要编译其他工具,另外需要提前编译对应的开源软件,例如openssl,或者sqilte等。

然后修改build/config/ARM-Linux文件,将TOOL修改为目标芯片的交叉编译工具:

#
# General Settings
#
LINKMODE           ?= SHARED
TOOL               ?= arm-linux
POCO_TARGET_OSNAME  = Linux
POCO_TARGET_OSARCH ?= armv7l

修为完保存后,编译即可。

make
make install
  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值