VS2012 下编译boost1.52

VS2012 下编译boost1.52

2012-12-25 20:35 by Scott Guthrie Liu, 684 阅读, 1 评论, 收藏编辑

1. 下载boost_1_52_0.7z
    http://sourceforge.net/projects/boost/files/boost/1.52.0/

2. 解压缩到d:\boost目录下
3. 编译bjam
(1)从开始菜单运行“VS2012 开发人员命令提示”
(2)cd到D:\boost\boost_1_52_0下执行bootstrap.bat,然后,会在D:\boost\boost_1_52_0下生成bjam.exe
4.设定编译环境
   我的机器上仅安装了VS2012所以未配置
5. 编译boost库 
    本人使用的bjam命令如下:
bjam stage --toolset=msvc-11.0 --without-graph --without-graph_parallel --without-math --without-mpi --without-python --without-serialization --without-wave --stagedir="D:\boost\boost_1_52_0\bin\vc11" link=static runtime-link=shared runtime-link=static threading=multi debug release
    15分钟编译完毕。
    关于编译的取舍参考 :http://www.boost.org/doc/libs/1_52_0/more/getting_started/windows.html

The only Boost libraries that must be built separately are:

A few libraries have optional separately-compiled binaries:

  • Boost.DateTime has a binary component that is only needed if you're using its to_string/from_string or serialization features, or if you're targeting Visual C++ 6.x or Borland.
  • Boost.Graph also has a binary component that is only needed if you intend to parse GraphViz files.
  • Boost.Math has binary components for the TR1 and C99 cmath functions.
  • Boost.Random has a binary component which is only needed if you're using random_device.
  • Boost.Test can be used in “header-only” or “separately compiled” mode, although separate compilation is recommended for serious use.

6.设定vs2012环境

用VS 2012新建一个win32控制台应用程序名为Hello。
“属性管理” -> Microsoft.Cpp.Win32.user -> 右键“属性”
在弹出的对话框"C++目录" -> “包含目录”添加 D:\boost\boost_1_52_0
                                   -> “库目录”添加 D:\boost\boost_1_52_0\bin\vc11\lib

通过使用 boost/regex.hpp 简单程序判断配置正确。

复制代码
#include <boost/timer.hpp>
#include <cassert>
#include "boost/regex.hpp" 
using namespace boost;

int _tmain(int argc, _TCHAR* argv[])
{
    cout << "Hello , World !" << endl;

    timer t;
    cout << "elapsed_max " << t.elapsed_max() / 3600 << "h" <<endl;
    cout<< "elapsed_min " << t.elapsed_min() << "s" << endl;
    cout << "elapsed " << t.elapsed() << "s" <<endl;

    // 3 digits, a word, any character, 2 digits or "N/A", 
    // a space, then the first word again 
    boost::regex reg("\\d{3}([a-zA-Z]+).(\\d{2}|N/A)\\s\\1"); 

    std::string correct="123Hello N/A Hello"; 
    std::string incorrect="123Hello 12 hello"; 

    assert(boost::regex_match(correct,reg)==true); 
    assert(boost::regex_match(incorrect,reg)==false); 

    
    return 0;
}
复制代码

 

主要参考 :
http://www.cnblogs.com/wondering/archive/2009/05/21/boost_setup.html
http://www.cppblog.com/flyinghare/archive/2010/09/07/126078.aspx
http://chenrongya.blog.163.com/blog/static/874741962010102041157963/

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
牙科就诊管理系统利用当下成熟完善的SSM框架,使用跨平台的可开发大型商业网站的Java语言,以及最受欢迎的RDBMS应用软件之一的Mysql数据库进行程序开发。实现了用户在线查看数据。管理员管理病例管理、字典管理、公告管理、药单管理、药品管理、药品收藏管理、药品评价管理、药品订单管理、牙医管理、牙医收藏管理、牙医评价管理、牙医挂号管理、用户管理、管理员管理等功能。牙科就诊管理系统的开发根据操作人员需要设计的界面简洁美观,在功能模块布局上跟同类型网站保持一致,程序在实现基本要求功能时,也为数据信息面临的安全问题提供了一些实用的解决方案。可以说该程序在帮助管理者高效率地处理工作事务的同时,也实现了数据信息的整体化,规范化与自动化。 管理员在后台主要管理病例管理、字典管理、公告管理、药单管理、药品管理、药品收藏管理、药品评价管理、药品订单管理、牙医管理、牙医收藏管理、牙医评价管理、牙医挂号管理、用户管理、管理员管理等。 牙医列表页面,此页面提供给管理员的功能有:查看牙医、新增牙医、修改牙医、删除牙医等。公告信息管理页面提供的功能操作有:新增公告,修改公告,删除公告操作。公告类型管理页面显示所有公告类型,在此页面既可以让管理员添加新的公告信息类型,也能对已有的公告类型信息执行编辑更新,失效的公告类型信息也能让管理员快速删除。药品管理页面,此页面提供给管理员的功能有:新增药品,修改药品,删除药品。药品类型管理页面,此页面提供给管理员的功能有:新增药品类型,修改药品类型,删除药品类型。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值