交叉编译odb

odb odb-sqlite 交叉编译

1.官网下载源码

​ https://www.codesynthesis.com/products/odb/download.xhtml 下载

在这里插入图片描述

libodb-2.4.0 odb源码

libodb-sqlite-2.4.0 sqlite 支持插件源码

编译器可以直接下载 odb-2.4.0-i686-windows 安装得到odb.exe 在win平台生成通过xxx.hxx 生成xxx-odb.hxx xxx-odb.cxx xxx-odb.ixx

2.交叉编译libodb

cd到源码根目录

./configure --host=arm-linux-gnueabihf \ (指定平台)

CXX=arm-linux-gnueabihf-g++ \ (指定g++)

CC=arm-linux-gnueabihf-gcc \ (指定gcc)

–prefix=/root/share/xxx/output/debug (指定输出目录)

无错误则 make && make make 后odb/.libs文件夹下就有所有库文件

在这里插入图片描述

3.交叉编译libodb-sqlite-2.4.0 需先将sqlite3 编译好

./configure \

–host=arm-linux-gnueabihf CXX=arm-linux-gnueabihf-g++ CC=arm-linux-gnueabihf-gcc \

CPPFLAGS="-I/root/share/xxx/src/3rdparty/libodb-2.4.0/odb -I/root/share/host/src/3rdparty/libodb-sqlite-2.4.0/sqlite3" \

CXXFLAGS="-O0" \

LDFLAGS="-L/root/share/xxx/src/3rdparty/libodb-2.4.0/odb/.libs -ldl -L/root/share/host/src/3rdparty/libodb-sqlite-2.4.0/sqlite3 -ldl" \

–cache-file=“config.log” \

–with-libodb=/root/share/host/src/3rdparty/libodb-2.4.0 \

–prefix=/root/share/host/output/release

无错误则 make && make install make后在 libodb-sqlite-2.4.0/odb/sqlite/.libs 文件夹(隐藏)下就有所有库文件

在这里插入图片描述

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值