简体   繁体   中英

LNK2001 errors while using PCL's BreadthFirstIterator

Here's the code for my code pcl::octree::OctreePointCloud::BreadthFirstIterator tree_depth_it; pcl::octree::OctreePointCloud::BreadthFirstIterator 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()){...

Errors shown

Error 1 error LNK2001: unresolved external symbol "public: class pcl::octree::OctreeBreadthFirstIterator > & __cdecl pcl::octree::OctreeBreadthFirstIterator >::operator++(void)" (??E?$OctreeBreadthFirstIterator@V?$OctreeBase@VOctreeContainerPointIndices@octree@pcl@@VOctreeContainerEmpty@23@@octree@pcl@@@octree@pcl@@QEAAAEAV012@XZ) C:\\Pathe\\Octree.obj manipulability_core

There wasnt any errors when I used OctreePointCloudSearch but ever since Ive added the BreadthFirstIterator code the error will show up. Ive linked the standard pcl_octree_debug.lib, boosts lib and misc pcl libs but still I am unable to get rid of the error.

Found the answer to my question from a japanese website,

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

Apparently you need to insert the following line in your code

#include <pcl/octree/octree_impl.h>

A reference for anyone using PCL encountering any LNK200X problems

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM