您的位置:首页 > 其它

vs2015 配置boost

2016-07-08 08:06 267 查看
vs2015 配置boost1、首先到boost官网去下载最新的版本的boost库:http://www.boost.org/http://www.boost.org/users/download/2、解压文件,在命令提示符中打开到boost库的根目录下:双击bootstrap.bat文件,生成bjam.exe,执行以下命令:bjam --toolset=msvc --build-type=complete stage // 32位b2.exe --build-type=complete --stagedir=".\lib\vc12_x64" address-model=64  //64位或者直接双击bjam.exe.等待程序编译完成,大约要两个小时左右,会在boost根目录下生成bin.v2和stage两个文件夹,其中bin.v2下是生成的中间文件,大小在2.7G左右,可以直接删除。stage下才是生成的dll和lib文件。3、打开vs:视图->属性管理器->当前项目->Debug|Win32->Microsoft.Cpp.Win32.user双击在弹出的属性对话框中:通用属性->VC++目录:"包含目录": boost的根目录,例: D:\Visual Stdio 2013\lipeng\boost\boost_1_58_0"库目录":stage下的链接库目录,例:D:\Visual Stdio 2013\lipeng\boost\boost_1_58_0\stage\lib通用属性->链接器->常规:"附加库目录":同上面的"库目录",例:D:\Visual Stdio 2013\lipeng\boost\boost_1_58_0\stage\lib关于一些问题解决:1.Unknown compiler version while compiling Boost with MSVC 14.0 (VS 2015)To stop Boost 1.58 complaining about unknown compiler version edit 
boost/config/compiler/visualc.hpp
 andreplace:
// last known and checked version is 19.00.22129 (VC14 Preview):
#if (_MSC_VER > 1800 && _MSC_FULL_VER > 190022310)
with:
// last known and checked version is 19.00.22816 (VC++ 2015 RC):
#if (_MSC_VER > 1800 && _MSC_FULL_VER > 190022816)
which you can find is already done in boost repo here for upcoming Boost 1.59release.Update: For Visual Studio 2015 RTM set it to:
// last known and checked version is 19.00.23026 (VC++ 2015):
#if (_MSC_VER > 1800 && _MSC_FULL_VER > 190023026)
Update2: For Visual Studio 2015 Update 1 set it to:
// last known and checked version is 19.00.23506 (VC++ 2015 Update 1):
#if (_MSC_VER > 1800 && _MSC_FULL_VER > 190023506)
相关文章:1.http://www.jianshu.com/p/de1fda741beb
                                            
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: