我是靠谱客的博主 洁净电源,这篇文章主要介绍error: ‘next’ is not a member of ‘boost’,现在分享给大家,希望可以做个参考。

编译yaml-cpp 0.50及以上相关版本遇到问题:

/home/zf/LIBS/yaml-cpp-yaml-cpp-0.5.3/include/yaml-cpp/node/detail/iterator.h:48:54: error: ‘next’ is not a member of ‘boost’
   48 |   void increment() { this->base_reference() = boost::next(this->base()); }

最后找到boost::next的头文件为:

复制代码
1
#include <boost/next_prior.hpp>

增加一下到头文件即可。

编译步骤记录一下:

复制代码
1
cmake -D CMAKE_INSTALL_PREFIX=/home/zf/LIBS/yaml_libs -D BUILD_SHARED_LIBS=ON ..

yaml-cpp0.3及以下版本的功能函数和数据结构和后面的版本差别非常大,都是血泪教训,一点点试出来的。

最后

以上就是洁净电源最近收集整理的关于error: ‘next’ is not a member of ‘boost’的全部内容,更多相关error:内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(66)

评论列表共有 0 条评论

立即
投稿
返回
顶部