<html><body bgcolor="#FFFFFF"><div>Adam what version of PCL are you running? Check ../CMakeLists.txt.<br><br>Cheers,<div>Radu.</div><div>--<br><div><a href="http://www.rbrusu.com">http://www.rbrusu.com</a></div></div></div><div><br>On May 31, 2010, at 5:54 PM, Adam Leeper <<a href="mailto:aleeper@stanford.edu">aleeper@stanford.edu</a>> wrote:<br><br></div><div></div><blockquote type="cite"><div>Hi all-<br><br>I'm having some trouble compiling something with pcl.<br><br>I have a function that looks like this:<br><br>vector<pcl::PointCloud<pcl::PointXYZ> > segment_objects(pcl::PointCloud<pcl::PointXYZ> cloud) <br>
{ <br>   ... stuff .. <br>}<br><br>If I keep it within my main .cpp file everything compiles fine. But then I made a utilities.h/.cpp files and put segment_objects in there, and now it complains about multiple definitions of point_cloud::traits. There is a long list of them, but it only complains about those (point_cloud::traits), nothing else.<br>
<br>CMakeFiles/bigg_dynamic.dir/src/bigg_dynamic.o:(.rodata+0x106): multiple definition of `point_cloud::traits::name<pcl::PointXYZRGBA, point_cloud::fields::x>::value'<br>CMakeFiles/bigg_dynamic.dir/src/utilities.o:(.rodata+0x6): first defined here<br>
CMakeFiles/bigg_dynamic.dir/src/bigg_dynamic.o:(.rodata+0x108): multiple definition of `point_cloud::traits::name<pcl::PointXYZRGBA, point_cloud::fields::y>::value'<br>CMakeFiles/bigg_dynamic.dir/src/utilities.o:(.rodata+0x8): first defined here<br>
<br>I can't see any reason this shouldn't work, unless I am missing something about the templatization of pcl that might be screwing something up...<br><br>There are several other helper functions defined in these files that compile just fine and it doesn't complain about redfinitions, except these functions use only opencv.<br>
<br>Any help is appreciated!<br><br>--Adam<br><br><br><br clear="all">Adam Leeper<br>Stanford University<br><a href="mailto:aleeper@stanford.edu"><a href="mailto:aleeper@stanford.edu">aleeper@stanford.edu</a></a><br>719.358.3804<br>
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>ros-users mailing list</span><br><span><a href="mailto:ros-users@code.ros.org">ros-users@code.ros.org</a></span><br><span><a href="https://code.ros.org/mailman/listinfo/ros-users">https://code.ros.org/mailman/listinfo/ros-users</a></span><br></div></blockquote></body></html>