arm-Linux下boost库交叉编译
from: http://blog.csdn.net/jwybobo2007/article/details/7242307
下载解压boost,我现在用的是1.48,安装交叉编译器至指定位置,设置编译器路径到 PATH
1.首先运行boost解压目录下的
./bootstrap.sh
2.修改生成的project-config.jam文件
修改:
using gcc : arm : arm-none-linux-gnueabi-gcc ;
注:注意要有空格!
修改(这边不改也没事):
option.set prefix :(交叉编译器所在位置);
扫描二维码关注公众号,回复:
4097260 查看本文章
option.set exec-prefix :(交叉编译器所在位置)/bin ;
option.set libdir :(交叉编译器所在位置)/lib ;
option.set includedir :(交叉编译器所在位置)/include ;
注:最好对上面的(交叉编译器所在位置)进行设置,以便于交叉编译器能够正确查找boost库的安装目录。
我的交叉编译器arm-arago-linux-gnueabi位于/usr/local/arm-arago-linux-gnueabi,将路径添加进去就可以了。
3.测试编译效果
./bjam stage --layout=tagged --build-type=complete
还可以加(link=shared runtime-link=shared threading=multi)等编译参数
OK,编译完成
4.执行./b2
5.执行./b2 install