ARM移植RCF2.2
一、首先移植boost依赖库
1、首先去选择下载自己需要的boost版本;
2、下载好后,解压缩。
3、先运行./bootstrap.sh 这个脚本
4、会生成一个project-config.jam 文件,这个是编译的配置文件;
5、修改project-config.jam文件
if ! gcc in [ feature.values <toolset> ]
{
using gcc : arm : mipsel-openwrt-linux-uclibc-g++ ;
}
其中mipsel-openwrt-linux-uclibc-g++是你目标板的交叉工具链编译器。
6、编写build.sh脚本
#!/bin/bash
source ../env.sh
./bjam --prefix=`pwd`/build --link=shared --build-type=minimal --without-container --without-context --without-contract --without-coroutine --without-date_time --without-fiber --without-graph --without-graph_parallel --without-locale --without-log --without-mpi --without-program_options --without-python --without-regex --without-signals --without-stacktrace --without-test --without-type_erasure --without-wave
7、env.sh脚本是导入交叉编译器的到环境变量中而已
export PATH=/work/sdk/mt7628-system-sdk/toolchain-mipsel_24kc_gcc-7.5.0_musl/bin:$PATH
1、解压好后编写build.sh脚本
#!/bin/bash
. ../env.sh
mipsel-openwrt-linux-uclibc-g++ -std=c++11 -I ./include -I ../boost_1_68_0/build/ -L ../boost_1_68_0/build/lib -fPIC -shared ./src/RCF/RCF.cpp -lpthread -ldl -lboost_system -o libRCF.so