栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

QNX/LINUX/ANDROID/...简单编译libboost

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

QNX/LINUX/ANDROID/...简单编译libboost

下载boost源码

https://boostorg.jfrog.io/artifactory/main/release/1.71.0/source/boost_1_71_0.7z

解压源码

7z x  boost_1_71_0.7z

cd boost_1_71_0

设置QNX编译器环境变量

 souce qnx700/qnxsdp-env.sh

创建库安装目录

 mkdir -p _install/include

 mkdir -p _install/lib

编译libboost_filesystem.a

 

ntoaarch64-gcc -c -I. -I boost ./libs/filesystem/src/codecvt_error_category.cpp -o ./libs/filesystem/src/codecvt_error_category.o
ntoaarch64-gcc -c -I. -I boost ./libs/filesystem/src/operations.cpp -o ./libs/filesystem/src/operations.o
ntoaarch64-gcc -c -I. -I boost ./libs/filesystem/src/path.cpp -o ./libs/filesystem/src/path.o
ntoaarch64-gcc -c -I. -I boost ./libs/filesystem/src/path_traits.cpp -o ./libs/filesystem/src/path_traits.o
ntoaarch64-gcc -c -I. -I boost ./libs/filesystem/src/portability.cpp -o ./libs/filesystem/src/portability.o
ntoaarch64-gcc -c -I. -I boost ./libs/filesystem/src/unique_path.cpp -o ./libs/filesystem/src/unique_path.o
ntoaarch64-gcc -c -I. -I boost ./libs/filesystem/src/utf8_codecvt_facet.cpp -o ./libs/filesystem/src/utf8_codecvt_facet.o
ntoaarch64-gcc -c -I. -I boost ./libs/filesystem/src/windows_file_codecvt.cpp -o ./libs/filesystem/src/windows_file_codecvt.o

ntoaarch64-ar rcs
 ./_install/lib/libboost_filesystem.a
 ./libs/filesystem/src/codecvt_error_category.o
 ./libs/filesystem/src/operations.o
 ./libs/filesystem/src/path.o
 ./libs/filesystem/src/path_traits.o
 ./libs/filesystem/src/portability.o
 ./libs/filesystem/src/unique_path.o
 ./libs/filesystem/src/utf8_codecvt_facet.o
 ./libs/filesystem/src/windows_file_codecvt.o
 
 

编译libboost_system.a

ntoaarch64-gcc -c -I. -I boost ./libs/system/src/error_code.cpp -o ./libs/system/src/error_code.o
ntoaarch64-ar rcs
 ./_install/lib/libboost_system.a
 ./libs/system/src/error_code.o
 

 编译libboost_thread.a

ntoaarch64-gcc -c -I. -I boost ./libs/thread/src/pthread/thread.cpp -o ./libs/thread/src/pthread/thread.o
ntoaarch64-gcc -c -I. -I boost ./libs/thread/src/pthread/once.cpp -o ./libs/thread/src/pthread/once.o
ntoaarch64-gcc -c -I. -I boost ./libs/thread/src/future.cpp -o ./libs/thread/src/future.o
ntoaarch64-ar rcs
 ./_install/lib/libboost_thread.a
 ./libs/thread/src/pthread/thread.o
 ./libs/thread/src/pthread/once.o
 ./libs/thread/src/future.o 

最后收尾工作,安装头文件

 cp --parents `find boost/ -name "*.hpp"` _install/include/

cp --parents `find boost/ -name "*.ipp"` _install/include/
cp --parents `find boost/ -name "*.h"` _install/include/


 

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/964682.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号