最近因为要用C++做后台,所以就弄了一个Boost库,在网上看了很多的安装教程。可是,这些老司机总是只把你带到终点,就不告许你怎么弄的,或是断断续续的,所以就像写一篇完整一点的安装教程。
首先,可以在boost网站上,下载一个boost的windows版本的压缩包。链接地址为:http://www.boost.org/users/download/ 点击到download页面之后,选择.7z版本的。
我使用的是vs2013 x64本机工具命令提示,进行运行脚本。这个是在安装vs2013的时候附带的工具,如果找不到,可以去vs2013的安装路径找一下。
直接敲上bootstrap.bat就会在根目录生成bjam.exe
64位机的编译命令
bjam.exe stage --toolset=msvc-12.0 --without-graph --without-graph_parallel --without-math --without-mpi --without-serialization --without-wave --without-test --without -program_options --without-serialization --without-signals --stagedir=".\bin\vc12_x64" link= static runtime-link=shared threading=multi debug release address-model=64其中出现路径的是我设的值,你们请随意。
如果出现了bin,说明编译成功了。
右键项目,然后选中属性。
输出:
number: 123 123.012 string: 123 123.0123456789 bad lexical cast: source type value could not be interpreted as target 请按任意键继续. . .