boost库编译,windows , vs2008
来源:互联网 发布:中国选举制度知乎 编辑:程序博客网 时间:2024/06/06 19:17
Windows_VS2008下
文章中的版本,及目录,要根据自己用的实际版本目录情况做适当改动
1.下载安装包boost_1_53_0http://www.boost.org/users/download/
http://sourceforge.net/projects/boost/files/boost/1.55.0/
2.解压缩到d:/boost目录下
3.编译bjam
(1)从vs2010(vs2008)的工具菜单进入命令提示窗口(单击“开始”按钮,指向“所有程序”,指向“Microsoft Visua l Stuio 2010”,指向"工具",然后单击“Visual Studio 2010 command prompt(命令提示)”
(2)cd到d:/boost/boost_1_55_0下执行bootstrap.bat,然后,会在d:/boost/boost_1_55_0/下生成bjam.exe,
4.设定编译环境(加入红色字体)
修改user-config.jam (d:/boost/boost_1_53_0/tools/build/v2/user-config.jam) 的MSVC configuration
# MSVC configuration
# Configure msvc (default version, searched in standard location
# and PATH).
# using msvc ;
using msvc : 10.0 : : <compileflags>/wd4819 <compileflags>/D_CRT_SECURE_NO_DEPRECATE <compileflags>/D_SCL_SECURE_NO_DEPRECATE <compileflags>/D_SECURE_SCL=0 ;
5.將目录cd到d:/boost/boost_1_55_0/下执行?
(1) 编译boost库
bjam --without-python --toolset=msvc-9.0 --build-type=complete --prefix="d:/boost/boost_1_55_0" stage (这一步需要等待很长时间,大概一个小时左右……)
运行完后(弹出输入提示符)
(2) 则安装,输入:
bjam --with-python --toolset=msvc-9.0 --build-type=complete --prefix="d:/boost/boost_1_55_0" install (这一步时间也较长)。
6.设定vs2010(vs2008)环境。
Tools -> Options -> Projects and Solutions -> VC++ Directories?
在Library files加上D:\boost\boost_1_55_0\stage\lib
在Include files加上D:\boost\boost_1_55_0\include\boost-1_55
7.测试实例:
#include <boost/lambda/lambda.hpp>
#include <iostream>
#include <iterator>
#include <algorithm>
int main()
{
using namespace boost::lambda;
typedef std::istream_iterator<int> in;
std::for_each(in(std::cin), in(), std::cout << (_1 * 3) << " " );
}
- boost库编译,windows , vs2008
- VS2008编译boost库
- VS2008编译boost库
- VS2008编译boost库
- VS2008编译boost库
- VS2008编译boost库
- VS2008编译boost库
- VS2008编译boost库
- VS2008编译boost库
- VS2008编译boost库
- VS2008编译boost库
- [转]VS2008编译boost库
- vs2008编译 boost 1_35_0 regex 库
- VS2008下编译BOOST 1.39库使用
- VS2008下Boost库的安装编译
- VS2008下Boost库的安装编译
- VS2008下Boost库的安装编译
- vs2008编译boost
- 新手学习简单的调用系统Dialog
- Centos 6.4 安装mysql-5.6.14-linux-glibc2.5-i686.tar.gz
- [1]Strom Bug Fix: DRPC topology setNumWorkers()
- MAC虚拟机安装完整版
- 我写过的软件之TS Expert
- boost库编译,windows , vs2008
- java的File的工具类
- 不懂名词解释
- HTML5-Canvas标签使用实例一
- kafka 配置项解析
- python 的 subprocess模块用法 popen
- 进程与进程通信机制
- eclipse 中git解决冲突
- Java中List 去掉重复的值,并保持原先List顺序