做外贸的网站,门户网站手机版,完整html网页代码案例,爱电影网站Boost库是C领域公认的经过千锤百炼的知名C类库#xff0c;涉及编程中的方方面面#xff0c;简单记录一下使用时的安装过程1.boost库的下载boost库官网主页#xff1a;www.boost.org2.安装将下载的压缩包解压到指定的目录3.建立编译工具bjam.exe在源码目录下执行bootstrap.ba…Boost库是C领域公认的经过千锤百炼的知名C类库涉及编程中的方方面面简单记录一下使用时的安装过程1.boost库的下载boost库官网主页www.boost.org2.安装将下载的压缩包解压到指定的目录3.建立编译工具bjam.exe在源码目录下执行bootstrap.bat,生成bjam.exe4.在命令行模式下利用bjam编译boost库这里利用VS2012自带的命令行工具D:\Program Files\VS2012\VCcd D:\Program Files\BoostSDK\boostD:\Program Files\BoostSDK\boostbjam stageD:\Program Files\BoostSDK\boostbjam stage --toolsetmsvc-11.0 --without-graph --without-graph_parallel --without-mpi --without-wave --stagedirD:\Program Files\BoostSDK\bin\vc110 linkstatic runtime-linkshared runtime-linkstatic threadingmulti debug release说明--toolset 指明编译工具msvc-11.0表示Visual Studio 2012--stagedir 指明编译后库文件的存放路径--without-mpi表示不编译mpi库其他的--without类似boost库中有些库是必须要编译才能使用的大部分只要引用头文件即可少数是必须编译成二进制文件的。摘用官方文档的一点说明The first thing many people want to know is, “how do I build Boost?” The good news is that often, theres nothing to build.Nothing to Build?Most Boost libraries are header-only: they consist entirely of header files containing templates and inline functions, and require no separately-compiled library binaries or special treatment when linking.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 youre using its to_string/from_string or serialization features, or if youre 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 youre using random_device.Boost.Test can be used in “header-only” or “separately compiled” mode, although separate compilation is recommended for serious use.Boost.Exception provides non-intrusive implementation of exception_ptr for 32-bit _MSC_VER1310 and _MSC_VER1400 which requires a separately-compiled binary. This is enabled by #define BOOST_ENABLE_NON_INTRUSIVE_EXCEPTION_PTR.5.安静的等待库的编译完成