使用 PCL 的广度第一迭代器时LNK2001错误

LNK2001 errors while using PCL's BreadthFirstIterator

本文关键字:迭代器 LNK2001 错误 PCL 使用      更新时间:2023-10-16

这是我的代码的代码pcl::八叉树::OctreePointCloud:: BreadthFirstIterator tree_depth_it;pcl::octree::OctreePointCloud:: breadthfirst stiterator tree_depth_it_end = octree.breadth_end();

for (tree_depth_it = octree.breadth_begin(); tree_depth_it != tree_depth_it_end; ++tree_depth_it)
{
    if (tree_depth_it.isLeafNode()){...

显示错误

错误1错误LNK2001:未解析的外部符号"public: class pcl::octree:: octreebreadthfirstator> &__cdecl pcl::octree:: octreebreadthfirstator>::operator++(void)"(? ? E ? OctreeBreadthFirstIterator@V美元? OctreeBase@VOctreeContainerPointIndices@octree@pcl@@VOctreeContainerEmpty@23@@octree@pcl@@@octree@pcl@@QEAAAEAV012@XZ美元)C: Pathe 八叉树。obj manipulability_core

当我使用OctreePointCloudSearch时没有任何错误,但自从我添加了breadthfirst stiterator代码后,错误就会出现。我链接了标准的pcl_octree_debug。

在一个日本网站上找到了我的问题的答案,

来源:http://d.hatena.ne.jp/takmin/comment?date=20130719

显然你需要在你的代码中插入以下行

#include <pcl/octree/octree_impl.h>

任何使用PCL遇到任何LNK200X问题的人的参考