更新boost库

在项目中遇到编译错误,找不到Boost库文件boost/make_shared.hpp。通过查阅资料了解到该文件从Boost 1.23.0开始引入,但在1.39.0才包含。下载并安装Boost 1.58.0版本,将boost文件夹复制到/usr/include,解决了找不到库的问题。对于仅使用头文件的Boost库,无需单独编译。
摘要由CSDN通过智能技术生成

背景:项目需要用到其他team提供的动态库,编译的时候报错,提示找不到Boost库文件

adfin/Adfin_6.20152.6.20/include/AdMemory.h:23:33: error: boost/make_shared.hpp: No such file or directory


查阅Boost资料

http://www.boost.org/doc/libs/1_32_0/

http://www.boost.org/doc/libs/1_39_0/libs/smart_ptr/smart_ptr.htm

boost/make_shared.hpp属于Boost库的Memory系列Smart pointer classs templates,在Version 1.23.0中初次Release,属于Standard TR1.

但是在Version 1.39.0中才加入boost/make_shared.hpp


参照点击打开链接更新Boost库:

1.Get Boost

下载boost Version1.58,0

wget http://sourceforge.net/projects/boost/files/boost/1.58.0/boost_1_58_0.tar.bz2/download

解压缩

tar --bzip2 -xf  boost_1_58_0.tar.bz2

2.The Boost Distribution

下载后文件夹目录结构

boost_1_58_0/ .................The “boost root directory”
   index.htm .........A copy of www.boost.org starts here
   boost/ .........................All Boost Header files
    
   libs/ ............Tests, .cpps, docs, etc., by library
     index.html ........Library documentation starts here
     algorithm/
     any/
     array/
                     …more libraries…
   status/ .........................Boost-wide test suite
   tools/ ...........Utilities, e.g. Boost.Build, quickbook, bcp
   more/ ..........................Policy documents, etc.
   doc/
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值