Convex hull with custom point type

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

Convex hull with custom point type

Saeid
Hello all. I have defined a custom point type and I am trying to plug that
custom point type into pcl::convex_hull but I get the following linkage
error.


Error LNK2019 unresolved external symbol "void __cdecl qh_memfreeshort(int
*,int *)" (?qh_memfreeshort@@YAXPEAH0@Z) referenced in function "protected:
void __cdecl pcl::ConvexHull<struct
MyPointType>::performReconstruction2D(class pcl::PointCloud<struct
MyPointType> &,class std::vector<struct pcl::Vertices,class
std::allocator<struct pcl::Vertices> > &,bool)"
(?performReconstruction2D@?$ConvexHull@UMyPointType@@@pcl@@IEAAXAEAV?$PointCloud@UMyPointType@@@2@AEAV?$vector@UVertices@pcl@@V?$allocator@UVertices@pcl@@@std@@@std@@_N@Z)
convexhullcplusplus
C:\Users\Saeed\source\repos\convexhullcplusplus\convexhullcplusplus\convexhullcplusplus.obj
1
Error LNK2019 unresolved external symbol "int __cdecl qh_setsize(struct setT
*)" (?qh_setsize@@YAHPEAUsetT@@@Z) referenced in function "protected: void
__cdecl pcl::ConvexHull<struct MyPointType>::performReconstruction3D(class
pcl::PointCloud<struct MyPointType> &,class std::vector<struct
pcl::Vertices,class std::allocator<struct pcl::Vertices> > &,bool)"
(?performReconstruction3D@?$ConvexHull@UMyPointType@@@pcl@@IEAAXAEAV?$PointCloud@UMyPointType@@@2@AEAV?$vector@UVertices@pcl@@V?$allocator@UVertices@pcl@@@std@@@std@@_N@Z)
convexhullcplusplus
C:\Users\Saeed\source\repos\convexhullcplusplus\convexhullcplusplus\convexhullcplusplus.obj
1
Error LNK2019 unresolved external symbol "int __cdecl
qh_new_qhull(int,int,double *,unsigned int,char *,struct _iobuf *,struct
_iobuf *)" (?qh_new_qhull@@YAHHHPEANIPEADPEAU_iobuf@@2@Z) referenced in
function "protected: void __cdecl pcl::ConvexHull<struct
MyPointType>::performReconstruction2D(class pcl::PointCloud<struct
MyPointType> &,class std::vector<struct pcl::Vertices,class
std::allocator<struct pcl::Vertices> > &,bool)"
(?performReconstruction2D@?$ConvexHull@UMyPointType@@@pcl@@IEAAXAEAV?$PointCloud@UMyPointType@@@2@AEAV?$vector@UVertices@pcl@@V?$allocator@UVertices@pcl@@@std@@@std@@_N@Z)
convexhullcplusplus
C:\Users\Saeed\source\repos\convexhullcplusplus\convexhullcplusplus\convexhullcplusplus.obj
1
Error LNK2019 unresolved external symbol "void __cdecl qh_freeqhull(unsigned
int)" (?qh_freeqhull@@YAXI@Z) referenced in function "protected: void
__cdecl pcl::ConvexHull<struct MyPointType>::performReconstruction2D(class
pcl::PointCloud<struct MyPointType> &,class std::vector<struct
pcl::Vertices,class std::allocator<struct pcl::Vertices> > &,bool)"
(?performReconstruction2D@?$ConvexHull@UMyPointType@@@pcl@@IEAAXAEAV?$PointCloud@UMyPointType@@@2@AEAV?$vector@UVertices@pcl@@V?$allocator@UVertices@pcl@@@std@@@std@@_N@Z)
convexhullcplusplus
C:\Users\Saeed\source\repos\convexhullcplusplus\convexhullcplusplus\convexhullcplusplus.obj
1
Error LNK2019 unresolved external symbol "int __cdecl qh_pointid(double *)"
(?qh_pointid@@YAHPEAN@Z) referenced in function "protected: void __cdecl
pcl::ConvexHull<struct MyPointType>::performReconstruction2D(class
pcl::PointCloud<struct MyPointType> &,class std::vector<struct
pcl::Vertices,class std::allocator<struct pcl::Vertices> > &,bool)"
(?performReconstruction2D@?$ConvexHull@UMyPointType@@@pcl@@IEAAXAEAV?$PointCloud@UMyPointType@@@2@AEAV?$vector@UVertices@pcl@@V?$allocator@UVertices@pcl@@@std@@@std@@_N@Z)
convexhullcplusplus
C:\Users\Saeed\source\repos\convexhullcplusplus\convexhullcplusplus\convexhullcplusplus.obj
1
Error LNK2019 unresolved external symbol "void __cdecl qh_triangulate(void)"
(?qh_triangulate@@YAXXZ) referenced in function "protected: void __cdecl
pcl::ConvexHull<struct MyPointType>::performReconstruction3D(class
pcl::PointCloud<struct MyPointType> &,class std::vector<struct
pcl::Vertices,class std::allocator<struct pcl::Vertices> > &,bool)"
(?performReconstruction3D@?$ConvexHull@UMyPointType@@@pcl@@IEAAXAEAV?$PointCloud@UMyPointType@@@2@AEAV?$vector@UVertices@pcl@@V?$allocator@UVertices@pcl@@@std@@@std@@_N@Z)
convexhullcplusplus
C:\Users\Saeed\source\repos\convexhullcplusplus\convexhullcplusplus\convexhullcplusplus.obj
1
Error LNK2019 unresolved external symbol "void __cdecl
qh_prepare_output(void)" (?qh_prepare_output@@YAXXZ) referenced in function
"protected: void __cdecl pcl::ConvexHull<struct
MyPointType>::performReconstruction2D(class pcl::PointCloud<struct
MyPointType> &,class std::vector<struct pcl::Vertices,class
std::allocator<struct pcl::Vertices> > &,bool)"
(?performReconstruction2D@?$ConvexHull@UMyPointType@@@pcl@@IEAAXAEAV?$PointCloud@UMyPointType@@@2@AEAV?$vector@UVertices@pcl@@V?$allocator@UVertices@pcl@@@std@@@std@@_N@Z)
convexhullcplusplus
C:\Users\Saeed\source\repos\convexhullcplusplus\convexhullcplusplus\convexhullcplusplus.obj
1


but when I use other algorithms like segmentation or savePCDFile, I do not
face any compilation issues.

here is the code :

#define PCL_NO_PRECOMPILE
#include <pcl/point_types.h>
#include <pcl/point_cloud.h>
#include <pcl/io/pcd_io.h>
#include <pcl/surface/convex_hull.h>
#include <pcl/segmentation/sac_segmentation.h>

struct MyPointType
{
        PCL_ADD_POINT4D;                  // preferred way of adding a XYZ+padding
        float test;
        EIGEN_MAKE_ALIGNED_OPERATOR_NEW   // make sure our new allocators are
aligned
} EIGEN_ALIGN16;                    // enforce SSE padding for correct
memory alignment

POINT_CLOUD_REGISTER_POINT_STRUCT(MyPointType,           // here we assume a
XYZ + "test" (as fields)
(float, x, x)
(float, y, y)
(float, z, z)
(float, test, test)
)


int
main(int argc, char** argv)
{
        pcl::PointCloud<MyPointType> cloud;
        cloud.points.resize(2);
        cloud.width = 2;
        cloud.height = 1;

        cloud.points[0].test = 1;
        cloud.points[1].test = 2;
        cloud.points[0].x = cloud.points[0].y = cloud.points[0].z = 0;
        cloud.points[1].x = cloud.points[1].y = cloud.points[1].z = 3;

        pcl::ConvexHull<MyPointType> convexHull;
        pcl::SACSegmentation<MyPointType> segmentation;
}



 



--
Sent from: http://www.pcl-users.org/
_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users