使用mips交叉编译器编译boost
来源:互联网 发布:在线视频解析源码 编辑:程序博客网 时间:2024/06/10 07:36
编译方式和arm交叉编译类似,不过我用的交叉编译器版本非常老,是3.40的
boost库,可以使用任意版本,下载地址:http://www.boost.org
编译方法
1. 下载解压boost库到任意位置,如/home/boost_1_48_0/
2. 切换目录至/home/boost_1_48_0,运行bootstrap.sh,此时在当前目录下会生成bjam这个程序,另外产生project-config.jam编译配置文件
3. 修改project-config.jam为以下内容:
# Boost.Build Configuration
# Automatically generated by bootstrap.sh
import option ;
import feature ;
# Compiler configuration. This definition will be used unless
# you already have defined some toolsets in your user-config.jam
# file.
if ! gcc in [ feature.values <toolset> ]
{
#关键是以下这句的修改
using gcc : mips : mipsel-linux-g++ ;
#编译arm版本则改为 using gcc : arm : arm-none-linux-gnueabi-g++ ;
#另外生成目录或者放置编译结果的目录请自行另作选择
}
project : default-build <toolset>gcc ;
# Python configuration
using python : 2.7 : /usr ;
# List of --with-<library> and --without-<library>
# options. If left empty, all libraries will be built.
# Options specified on the command line completely
# override this variable.
libraries = ;
# These settings are equivivalent to corresponding command-line
# options.
option.set prefix : /usr/mips ;
option.set exec-prefix : /usr/mips ;
option.set libdir : /usr/mips/lib ;
option.set includedir : /usr/mips/include ;
# Stop on first error
option.set keep-going : false ;
4. 执行命令行:
./bjam stage--with-thread --with-signals --with-system link=static runtime-link=sharedthreading=multi --layout=tagged
此处仅编译3个所需要用到的库,编译多的话,可能会有错误,编译完成后在/home/boost_1_48_0/stage/lib下面能看到生成的库文件
5. 创建目录/usr/mips,/usr/mips/include,/usr/mips/lib;将/home/boost_1_48_0/boost/这个目录拷贝至/usr/mips/include下,将/home/boost_1_48_0/stage/lib下的库文件拷贝至/usr/mips/lib下。
6. Boost编译安装完成
- 使用mips交叉编译器编译boost
- ubuntu16.04编译gcc5.04为X86-mips交叉编译器
- mips 交叉编译valgrind
- MIPS交叉编译openvpn
- arm交叉编译器编译boost库并调用(记录)
- Jsoncpp 编译【mips交叉编译】
- 嵌入式linux使用交叉编译器编译ACE
- 在windows下用 cgywin编译MIPS的gnu交叉编译器
- Mips 交叉编译工具安装
- linphone的交叉编译(MIPS)
- MIPS平台交叉编译zlib
- Mips下交叉编译dropbear
- openssl交叉编译 mips环境
- mips下交叉编译iperf
- mips eldk交叉编译错误
- mosquitto的交叉编译mips
- Linux下构建 MIPS 交叉编译器
- 实现MIPS处理器的交叉编译器笔记
- What are the different Ethernet frame formats? (Ethernet Data Link Layer)
- 简单工厂模式,工厂方法模式和抽象工厂模式的区别
- xxx is not in the sudoers file. This incident will be reported的解决方法
- spring-ws
- android程序启动画面之Splash总结
- 使用mips交叉编译器编译boost
- jquery validate (3) : ajax请求服务器端验证
- mssql 数据库大小统计方法
- 《Java 2核心技术卷一》(读书笔记一)
- 《Java 程序设计》— 类与对象
- 《Java 程序设计》— 继承与多态
- 《Java 程序设计》— 异常处理
- 《Java 程序设计》— IO接口(I)
- csapp2e 家庭作业 2.71