[ros-users] Using PCL standalone version linker problem

Kasper, Alexander alexander.kasper at kit.edu
Thu Feb 17 10:01:49 UTC 2011


Hi all,

I'm trying to use the PCL standalone version 0.9.0 in Windows 7 with Visual Studio 2010. I got the library compiled and linked but now when linking the PCL libs to my project I'm running into a nasty linker error:
pcl_sample_consensus.lib(sac_model_cylinder.obj) : error LNK2005: "void __cdecl pcl::lineToLineSegment(class Eigen::Matrix<float,-1,1,0,-1,1> const &,class Eigen::Matrix<float,-1,1,0,-1,1> const &,class Eigen::Matrix<float,4,1,0,4,1> &,class Eigen::Matrix<float,4,1,0,4,1> &)" (?lineToLineSegment at pcl@@YAXABV?$Matrix at M$0?0$00$0A@$0?0$00 at Eigen@@0AAV?$Matrix at M$03$00$0A@$03$00 at 3@1 at Z) already defined in pcl_segmentation.lib(sac_segmentation.obj)

What I'm doing in my code is just create a pcl::Pointcloud<pcl::PointXYZRGBNormal>, filling it with some values and then trying to use the segmentation Tutorial (http://www.ros.org/wiki/pcl/Tutorials/Planar%20model%20segmentation). From the tutorial I'm using only this code so far:

pcl::ModelCoefficients Coefficients;
pcl::PointIndices Inliers;
// Create the segmentation object
pcl::SACSegmentation<PType> Seg;
// Optional
Seg.setOptimizeCoefficients (true);
// Mandatory
Seg.setModelType (pcl::SACMODEL_PLANE);
Seg.setMethodType (pcl::SAC_RANSAC);
Seg.setDistanceThreshold (0.01);

I'm linking all of PCL's libraries to my project, though there seems to be an issue with the segmentation library conflicting with the sample_consensus lib. Might this be an issue with a windows build of PCL? The documentation linked to some extra CMake files for the windows build, but these seemed to be for version 0.7.0 and the ones provided with 0.9.0 worked somehow. Just wanted to ask on the list before I dig into the PCL myself.

Greetings,
   Alex Kasper


_____________________________________________________________________________
Karlsruher Institut für Technologie (KIT)
Institut für Anthropomatik - IfA
Humanoids and Intelligence Systems Lab

Alexander Kasper
Wiss. Mitarbeiter

Adenauerring 4 (Gebäude 50.21, Raum 207)
76131 Karlsruhe

Telefon: +49 721 608 - 5943
Fax: +49 721 608 - 5959
E-Mail: alexander.kasper at kit.edu

wwwiaim.ira.uka.de

KIT - Universität des Landes Baden-Württemberg und nationales Großforschungszentrum in der Helmholtz-Gemeinschaft

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osuosl.org/pipermail/ros-users/attachments/20110217/a7a41f6b/attachment-0002.html>


More information about the ros-users mailing list