Boost做得很好,有自己的build系统,可以几乎一键式编译,这才是尼玛世界一流质量的良心开源库啊。

将Boost 1.49.0解压到boost/boost_1_49_0里面,然后在boost目录底下创建以下bat脚本:

@echo off

cd boost_1_49_0

:: build
call bootstrap.bat
bjam -j4 variant=release link=static runtime-link=static threading=multi --with-filesystem --with-locale --with-thread --with-regex --with-system --with-date_time --with-wave stage
bjam -j4 variant=debug link=static runtime-link=static threading=multi --with-filesystem --with-locale --with-thread --with-regex --with-system --with-date_time --with-wave stage

:: copy files
mkdir ..\elvic\lib
mkdir ..\elvic\include\boost
xcopy /E /Y stage\lib ..\elvic\lib
xcopy /E /Y boost ..\elvic\include\boost

cd..

用Visual Studio 2008命令行运行这个脚本就会把32位的Debug和Release都生成到boost/elvic目录底下了。

如果要编译64位的build请使用以下脚本:

@echo off

cd boost_1_49_0

:: build
call bootstrap.bat
bjam -j4 architecture=x86 address-model=64 variant=release link=static runtime-link=static threading=multi --with-filesystem --with-locale --with-thread --with-regex --with-system --with-date_time stage --with-wave
bjam -j4 architecture=x86 address-model=64 variant=debug link=static runtime-link=static threading=multi --with-filesystem --with-locale --with-thread --with-regex --with-system --with-date_time stage --with-wave

:: copy files
mkdir ..\elvic64\lib
mkdir ..\elvic64\include\boost
xcopy /E /Y stage\lib ..\elvic64\lib
xcopy /E /Y boost ..\elvic64\include\boost

cd..

-j4是指定使用4个进程来编译。

Windows上编译Boost的更多相关文章

  1. windows上编译boost库

    要用xx库,编译boost时就指定--with-xx.例如: # 下载并解压boost_1.58 # 进入boost_1.58目录 bjam.exe toolset=msvc-14.0 --build ...

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

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

  3. 在Mac/Linux/Windows上编译corefx遇到的问题及解决方法

    这两天尝试在Mac/Linux/Windows三大平台上编译.NET跨平台三驾马车(coreclr/corefx/dnx)之一的corefx(.NET Core Framework),结果三个平台的编 ...

  4. [ZZ] 在windows上编译Mesa3d opengl32库

    在windows上编译Mesa3d opengl32库 cheungmine http://blog.csdn.net/ubuntu64fan/article/details/8061475 Mesa ...

  5. 利用openssl管理证书及SSL编程第2部分:在Windows上编译 openssl

    利用openssl管理证书及SSL编程第2部分:在Windows上编译 openssl 首先mingw的环境搭建,务必遵循下文: http://blog.csdn.net/ubuntu64fan/ar ...

  6. 在windows上编译wireshark源代码

    终于在windows上成功编译了wireshark源代码,个中酸辛,都是泪..只能说要多试! windows上编译wireshark共用到三个东西:wireshark源代码.python.cygwin ...

  7. 在windows 上编译部署Rap2

    在windows 上编译部署Rap2 引言 安装需要的环境 安装后端站点 创建数据库 在全局安装pm2 和 typescript 配置mysql,redis 数据库链接配置 初始化 编译 初始化数据库 ...

  8. 在windows上编译MatConvNet

    有个BT的要求,在windows上使用MatConvNet,并且需要支持GPU. 费了些力气,记录一下过程(暂不支持vl_imreadjpeg函数) 在这里下载MatConvNet,机器配置vs201 ...

  9. 如何在 Windows上编译Objective-C

    Objective-C现在几乎已经变成了苹果的专利了,可以直接在苹果的Xcode上编译Objective-C程序,但是在Windows平台下的编译工具就寥寥无几了,本身这种语言用的人就不是很多.今天在 ...

随机推荐

  1. LInux命令执行http请求

    Linux下提供了一些命令可以直接执行http请求,下面举例来介绍几个命令. http // GET请求 http http://127.0.0.1:2379/version http GET htt ...

  2. Oracle 与 MySQL 批量添加

    Oracle: <update id="createNew" statementType="STATEMENT" parameterType=" ...

  3. shell编程——变量的数值计算

    在shell脚本中,有时候会需要对数值类型的变量进行计算,通常我们用的是(()) [root@localhost collect]# ((a=1+2)) [root@localhost collect ...

  4. ABAP内表数据和JSON格式互转

    本程序演示ABAP内表数据如何转为JSON格式,以及JSON数据如何放入内表. 注:json字符串格式如:jsonstr = '[ {flag: "0",message: &quo ...

  5. Apache Spark介绍及集群搭建

    简介 Spark是一个针对于大规模数据处理的统一分析引擎.其处理速度比MapReduce快很多.其特征有: 1.速度快 spark比mapreduce在内存中快100x,比mapreduce在磁盘中快 ...

  6. java常用正则校验工具类

    正则常用校验工具类 import java.util.regex.Pattern; /** * @program: * @description: 校验工具类 * @author: xujingyan ...

  7. Opencv convertScaleAbs

    void cv::convertScaleAbs( cv::InputArray src, // 输入数组 cv::OutputArray dst, // 输出数组 double alpha = 1. ...

  8. [C++] c pointer

    the nature of pointer const keyword const int*  p int const *p int*  const p int const a const int a ...

  9. SQL序列键

    当需要更新表中的数据或像表中插入数据时,在很多情况下需要产生唯一的整数序列键 一:更新列的值为唯一值 原数据如下图: 可以定义一个CTE,返回orerid列的值以及row_number()的计算结果. ...

  10. (2)WePHP 控制器与使用模板

    <?php class C_index extends Action { public function __initialize() { echo"自动执行"; } pub ...