首先下载boost库,网上自己搜索。

然后解压到一个目录:如D:\boost_1_49_0。然打开vs2005的命令提示符,进行D:\boost_1_49_0目录:

1.运行bootstrap.bat。

2.运行如下命令:b2 install --prefix=库文件的目录(如:d:\lib) --toolset=msvc-8.0 --without-python。

如:b2 install --prefix=d:\lib --toolset=msvc-8.0 --without-python

大概运行40分钟左右,根据机器速度而来。

设定vs2005环境
Tools -> Options -> Projects and Solutions -> VC++ Directories

在Library files加上D:\lib\lib

在Include files加上D:\lib\include\boost-1_49

测试程序:

#include <iostream>
#include <string>
#include <boost/algorithm/string.hpp>
#include <boost/algorithm/string_regex.hpp>
using namespace std;
using namespace boost;
int main() {
string s = " Hello boost!! ";
trim(s);
cout << s << endl;
getchar();
std::string regstr = "a+";
boost::regex expression(regstr);
std::string testString = "aaa";
// 匹配至少一个a
if( boost::regex_match(testString, expression) )
{
std::cout<< "Match" << std::endl;
}
else
{
std::cout<< "Not Match" << std::endl;
}
}

boost 1.49在vs 2005下编译的方法的更多相关文章

  1. mac下编译optool方法

    参考地址:http://www.mopsled.com/2016/build-optool-osx/ 1.git clone https://github.com/alexzielenski/opto ...

  2. [转]linux下编译boost.python

    转自:http://blog.csdn.net/gong_xucheng/article/details/25045407 linux下编译boost.python 最近项目使用c++操作python ...

  3. centos下两种方法安装git

    来自:http://blog.slogra.com/post-176.html 今天下个包需要使用git,网上找了下看到大多数只有编译安装,并且编译安装还有错,不知道他们也没有实验过,这里我来给大家介 ...

  4. linux下编译安装boost库

    linux下编译安装boost库 linux下编译安装boost库 1.下载并解压boost 1.58 源代码 下载 解压 2.运行bootstrap.sh 3.使用b2进行构建 构建成功的提示 4. ...

  5. Linux下编译使用boost库:

    Boost是什么不多说, 下面说说怎样在Linux下编译使用Boost的所有模块. 1. 先去Boost官网下载最新的Boost版本, 我下载的是boost_1_56_0版本, 解压. 2. 进入解压 ...

  6. VC++2010下编译STLport,Boost

    VC++2010下编译STLport,Boost 最近在想向Boost转移,努力掌握Boost代码的过程中, STLport版本:5.2.1 Boost版本:1.4.6.1 (1.4.7.0也OK) ...

  7. 如何在WINDOWS下编译BOOST C++库 .

    如何在WINDOWS下编译BOOST C++库 cheungmine 2008-6-25   写出来,怕自己以后忘记了,也为初学者参考.使用VC8.0和boost1.35.0.   1)下载boost ...

  8. windows下编译Boost

    当前boost最新版本为1.55,下载地址:http://sourceforge.net/projects/boost/files/boost/1.55.0/或者从官网(www.boost.org)下 ...

  9. windows下编译和安装boost库

    boost是一个功能强大.构造精巧.跨平台.开源并且完全免费的C++程序库. 获取方式 boost提供源码形式的安装包,可以从boost官方网站下载,目前最新版本是1.59.0. 本机上正好有boos ...

随机推荐

  1. easyui datagrid shift 多选

    <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <meta na ...

  2. Introducing Visual Studio’s Emulator for Android

    visual studio 2015支持Android开发了. Microsoft released Visual Studio 2015 Preview this week and with it ...

  3. sql server 查看表的行数

    SELECT  a.name ,        b.[rows]FROM    dbo.sysobjects AS a        LEFT JOIN sysindexes AS b ON a.id ...

  4. Swift入门教程:基本语法(三)

    打印输出 Swift提供了2个打印输出函数 println :输出内容后会自动换行 print :对比println,少了个自动换行的功能 示例 输出字符串 println("欢迎学习传智播 ...

  5. Aspose.Words 直接写response导出docx文档显示文件已损坏需要修复的解决办法

    使用Aspose.Words的Document.Save(HttpResponse response, string fileName, ContentDisposition contentDispo ...

  6. style、currentStyle、getComputeStylel的使用

    (1)js中使用obj.style的用法,是为了获得内联样式,即style属性中的值. 如果想获取obj.style.display,但内联样式表中没有定义display,那么将返回一个空的字符串. ...

  7. 解决wps for linux 中文输入法光标不跟随的问题

    需要安装qt4-qtconfig和ibus-qt4,安装ibus-qt4之后才能在qt4-qtconfig“界面”选项卡默认输入法选项中看到ibus,选定它,然后设置XIM输入风格为光标跟随风格,保存 ...

  8. Vs2010中水晶报表引用及打包

    原文:Vs2010中水晶报表引用及打包 转自:http://yunhaifeiwu.iteye.com/blog/1172283 Vs2010中水晶报表引用 在sap官网中下载支持vs 2010中的水 ...

  9. 1001. 杀死吸引力(3n+1)猜想 (15)(ZJUPAT 数学)

    主题链接:http://pat.zju.edu.cn/contests/pat-b-practise/1001 卡拉兹(Callatz)猜想: 对不论什么一个自然数n,假设它是偶数,那么把它砍掉一半. ...

  10. 31、Thinking in Java