[ros-users] Using PCL standalone version linker problem

Top Page
Attachments:
Message as email
+ (text/plain)
+ (text/html)
Delete this message
Reply to this message
Author: User discussions
Date:  
To: ros-users@code.ros.org
Subject: [ros-users] Using PCL standalone version linker problem
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@pcl@@YAXABV?$Matrix@M$0?0$00$0A@$0?0$00@Eigen@@0AAV?$Matrix@M$03$00$0A@$03$00@3@1@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:

wwwiaim.ira.uka.de

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