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 文件夹(隐藏)下就有所有库文件