今年太忙了,没什么时间写个像样的东西啊,随手记录一下遇到的问题吧。
PCL库的实现里调用了Boost库
1. Boost和C++冲突:
In file included from /usr/include/boost/dynamic_bitset.hpp:15,
from /usr/include/pcl-1.10/pcl/filters/boost.h:52,
from /usr/include/pcl-1.10/pcl/filters/filter.h:45,
from ...
/usr/include/boost/dynamic_bitset/dynamic_bitset.hpp: In function ‘std::basic_ostream<_CharT, _Traits>& boost::operator<<(std::basic_ostream<_CharT, _Traits>&, const boost::dynamic_bitset<Block, Allocator>&)’:
/usr/include/boost/dynamic_bitset/dynamic_bitset.hpp:1734:21: error: reference to ‘basic_streambuf’ is ambiguous
1734 | typedef basic_streambuf<Ch, Tr> buffer_type;
| ^~~~~~~~~~~~~~~
In file included from /usr/include/boost/asio/basic_streambuf.hpp:27,
from /usr/include/boost/asio.hpp:36,
from ...
/usr/include/boost/asio/basic_streambuf_fwd.h

文章讲述了在使用PCL库时遇到的Boost库和C++标准库的冲突,以及Boost与VTK库中atomic和detail命名空间的冲突。解决方法是修改dynamic_bitset.hpp中引用basic_streambuf的地方为std::basic_streambuf,并将vtkAtomic.h中detail::的引用改为::detail::。
最低0.47元/天 解锁文章
1万+

被折叠的 条评论
为什么被折叠?



