[英]C++ How to link mongoc and mongocxx static library using CMakeList.txt
[英]mongoc library & cross compile for ARM
我尝试使用Ubuntu系统编译mongo c驱动程序以瞄准raspbian x86架构。
我正在使用Raspberry提供的工具链,以及我在做什么:
git clone https://github.com/mongodb/mongo-c-driver.git
cd mongo-c-driver
./autogen.sh
./configure --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf --with-libbson=bundled --enable-tests=no --enable-examples=no --enable-static --disable-shared
但它编译为x64:
objdum -a ./libs/libmongoc-1.0.&
文件格式为elf64-x86-64
我能做什么?
$ ./configure --help
描述用于设置交叉编译器的env变量
$ export CC=[PATH]/arm-linux-gnueabihf-cpp
$ export CXX=[PATH]/arm-linux-gnueabihf-g++
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.