Linker error LNK 2019, LNK1120 using PCL 1.8.0/1.6.0

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
Report Content as Inappropriate

Linker error LNK 2019, LNK1120 using PCL 1.8.0/1.6.0

This post has NOT been accepted by the mailing list yet.

Presently I am using Visual Studio 2010, PCL 1.8.0/1.6.0,
Now as per my requirement I have to add and bounding box to the cloud and to visualize the bounding box weather it is created for the given cloud, for Visualising we require the PCLVisualizer, when I am trying to initialize the PCLVisualizer get the below linker error and, As I am using the latest version of PCL, I though there might be any bug and I have downgraded to the older version 1.6.0 and tried but facing the same error can any one suggest me where I am exactly going wrong

Here is the code that I am using.

    int BoundingBox(pcl::PointCloud<pcl::PointXYZ>::Ptr point_cloud_ptr)
    // compute principal direction
    Eigen::Vector4f centroid;
    pcl::compute3DCentroid(*point_cloud_ptr, centroid);
    Eigen::Matrix3f covariance;
    computeCovarianceMatrixNormalized(*point_cloud_ptr, centroid, covariance);
    Eigen::SelfAdjointEigenSolver<Eigen::Matrix3f> eigen_solver(covariance,      Eigen::ComputeEigenvectors);
    Eigen::Matrix3f eigDx = eigen_solver.eigenvectors();
    eigDx.col(2) = eigDx.col(0).cross(eigDx.col(1));

    // move the points to the that reference frame
    Eigen::Matrix4f p2w(Eigen::Matrix4f::Identity());
    p2w.block<3,3>(0,0) = eigDx.transpose();
    p2w.block<3,1>(0,3) = -1.f * (p2w.block<3,3>(0,0) * centroid.head<3>());
        pcl::PointCloud<pcl::PointXYZ> cPoints;
    pcl::transformPointCloud(*point_cloud_ptr, cPoints, p2w);

        pcl::PointXYZ min_pt, max_pt;
    pcl::getMinMax3D(cPoints, min_pt, max_pt);
    const Eigen::Vector3f mean_diag = 0.5f*(max_pt.getVector3fMap() + min_pt.getVector3fMap());

    // final transform
    const Eigen::Quaternionf qfinal(eigDx);
    const Eigen::Vector3f tfinal = eigDx*mean_diag + centroid.head<3>();

    // draw the cloud and the box
    pcl::visualization::PCLVisualizer viewer;
    viewer.addCube(tfinal, qfinal, max_pt.x - min_pt.x, max_pt.y - min_pt.y, max_pt.z - min_pt.z);


the error which i get is shown below.

1. error in Release mode

error LNK2001: unresolved external symbol "public: void __cdecl vtkProp3D::SetUserMatrix(class vtkMatrix4x4 *)" (?SetUserMatrix@vtkProp3D@@QEAAXPEAVvtkMatrix4x4@@@Z)

2. error in Debug mode

error LNK2019: unresolved external symbol "public: void __cdecl vtkProp3D::SetUserMatrix(class vtkMatrix4x4 *)" (?SetUserMatrix@vtkProp3D@@QEAAXPEAVvtkMatrix4x4@@@Z) referenced in function "private: bool __cdecl pcl::visualization::PCLVisualizer::fromHandlersToScreen<struct pcl::PointXYZ>(class pcl::visualization::PointCloudGeometryHandler<struct pcl::PointXYZ> const &,class pcl::visualization::PointCloudColorHandler<struct pcl::PointXYZ> const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,int,class Eigen::Matrix<float,4,1,0,4,1> const &,class Eigen::Quaternion<float,0> const &)" (??$fromHandlersToScreen@UPointXYZ@pcl@@@PCLVisualizer@visualization@pcl@@AEAA_NAEBV?$PointCloudGeometryHandler@UPointXYZ@pcl@@@12@AEBV?$PointCloudColorHandler@UPointXYZ@pcl@@@12@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@HAEBV?$Matrix@M$03$00$0A@$03$00@Eigen@@AEBV?$Quaternion@M$0A@@8@@Z)

Any suggestions will be helpful

Thanks in Advance