VS2008 安装 Boost 1.43.0
来源:互联网 发布:apache ant 1.9.9 bin 编辑:程序博客网 时间:2024/06/03 23:39
1.打开 www.boost.org 下载最新版本 1.43.0, 解压至 D 盘根目录。
2.打开 Visual Studio 2008 命令提示窗口
3.进入 D:/boost_1_43_0/tools/jam/src
4.执行 build.bat ,会在 D:/boost_1_43_0/tools/jam/src/bin.ntx86 生成 bjam.exe 文件,复制 bjam.exe 文件到 D:/boost_1_43_0 下。
5.修改 D:/boost_1_43_0/tools/build/v2/user-config.jam 找到下面的文字
# -------------------
# MSVC configuration.
# -------------------
# Configure msvc (default version, searched for in standard locations and PATH).
# using msvc ;
# Configure specific msvc version (searched for in standard locations and PATH).
# using msvc : 8.0 ;
#在这里添加 vs2008 的配置
using msvc : 9.0 : : /wd4819 /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0 ;
6.进入 D:/boost_1_43_0 目录
7.执行bjam.exe 编译命令
bjam --without-python --toolset=msvc-9.0 --prefix=c:/boost install
等待编译完成,会很久。
8.新建一个空的 win32 console application 工程,tools->options->projects and solutions->VC++ directories,添加
include files:c:/boost/include/boost-1_43_0
library files: c:/boost/lib
9.测试, win32 console application
#include "stdafx.h"
#include <boost/lexical_cast.hpp>
#include <iostream>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
using boost::lexical_cast;
int a=lexical_cast<int>("123");
double b=lexical_cast<double>("123.0123456789");
string s0=lexical_cast<string>(a);
string s1=lexical_cast<string>(b);
cout<<"number: "<<a<<" "<<b<<endl;
cout<<"string: "<<s0<<" "<<s1<<endl;
int c=0;
try{
c=lexical_cast<int>("abcd");
}
catch(boost::bad_lexical_cast& e)
{
cout<<e.what()<<endl;
}
return 0;
}
- VS2008 安装 Boost 1.43.0
- VS2008 安装 Boost 1.43.0
- win7+vs2008安装boost(1.57.0)
- vs2008安装boost库
- VS2008下安装boost
- VS2008安装Boost library
- vs2008 安装 boost
- VS2008安装boost(手记)
- win7+VS2008安装boost
- win7+VS2008安装boost
- [转]VS2008下安装boost
- 安装boost库 配置vs2008
- boost stlport for vs2008 安装
- VS2008安装boost进行开发
- vs2008 编译boost 1.37.0
- VS2008下Boost库的安装编译
- Boost库安装(Vs2008环境)
- 转:boost安装笔记——vs2008
- ext GridPanel2 修改列的文本内容
- 安装MathType后word启动速度慢
- hibernate多对多增删改查
- 死循环
- Hibernate一对多增删改查
- VS2008 安装 Boost 1.43.0
- stl 中List vector deque区别
- chomp 与chop
- 深入剖析ASP.NET的编译原理之一:动态编译(Dynamical Compilation)
- 提高SQL 查询技能
- HTTP数据包头解析---之温故而知新!
- 数据库索引的作用和优点缺点
- qt-embedded和tslib移植到FS2410开发板
- sap gui 720安装后,点F1时,提示无法显示网页