c++ - Linking error in pcl EuclideanClusterExtraction -
i having strangest linking error when trying run illustration provided pcl:
http://www.pointclouds.org/documentation/tutorials/cluster_extraction.php
i have narrowed error downwards next line:
ec.extract (cluster_indices);
when remove line there no linking errors otherwise bunch this:
/usr/local/lib/libpcl_search.a(organized.cpp.o): in function `pcl::search::organizedneighbor<pcl::pointxyzl>::computecameramatrix(eigen::matrix<float, 3, 3, 0, 3, 3>&) const': organized.cpp:(.text._znk3pcl6search17organizedneighborins_9pointxyzlee19computecameramatrixern5eigen6matrixifli3eli3eli0eli3eli3eee [_znk3pcl6search17organizedneighborins_9pointxyzlee19computecameramatrixern5eigen6matrixifli3eli3eli0eli3eli3eee]+0xc): undefined reference `pcl::getcameramatrixfromprojectionmatrix(eigen::matrix<float, 3, 4, 1, 3, 4> const&, eigen::matrix<float, 3, 3, 0, 3, 3>&)'
ec
of type pcl::euclideanclusterextraction<pcl::pointxyz>
, of ascociated point clouds utilize pcl::pointxyz
template. straight out of example.
i have had similar error before , turned out because attempting utilize pcl::pointxy
sampleconsesus
library not supported.
to effort solve problem used nm
on libpcl_search.a
link library , values included this:
_znk3pcl6search17organizedneighborins_11pointnormalee19computecameramatrixern5eigen6matrixifli3eli3eli0eli3eli3eee
which close include funcitons needed, seems pointxyz
implementation doesn't exist? how can find out if case , why?
so looks cmake struggling dependencies. reason sure because of way forced include pcl. using operating scheme called qnx
means cmakelists.txt
needs this:
cmake_minimum_required(version 2.8 fatal_error) set (cmake_c_compiler /usr/qnx650/host/qnx6/x86/usr/bin/gcc) set (cmake_cxx_compiler /usr/qnx650/host/qnx6/x86/usr/bin/g++) project(cluster_extraction) find_package(pcl 1.7 required) include_directories(/usr/local/include /usr/local/include/pcl-1.7) link_directories(/usr/local/lib) add_definitions(${pcl_definitions}) add_executable (cluster_extraction testeuclideanclustering.cpp) target_link_libraries (cluster_extraction ${pcl_libraries})
if add together direct link pcl_search
after link of ${pcl_libraries}
compile. seems need create our own cmake
rules pcl
.
c++ static-linking point-cloud-library
No comments:
Post a Comment