0
votes

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.

1
I don't know the library you are using, but with VS you need to make sure that the library has been compiled with the same flags, especially regarding the run-time-library (switches /MD, /MT, etc.). - Gugi
Yep all libs are compiled using /MDd, tried switching to /MT, /MTd, doesnt work - user1250335
How about debug <--> release version? Any other compiler switches? If not, I am afraid that I can't help you, because I haven't even heard about the point-cloud-library. But when I had trouble with external libraries, the cause was almost always some incompatible compiler switch. Also have a look at: stackoverflow.com/questions/12573816/… - Gugi
Hey thanks for the reply, found the answer from a japanese website, will post it down below! Thanks for the help! - user1250335

1 Answers

4
votes

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