Open amiltonwong opened 7 years ago
supplement: cmake log
Supplement: If I comment out these two lines in CMakeLists.txt:
#add_executable (segmentation_kinect_test src/segmentation_kinect_test.cpp)
#target_link_libraries (segmentation_kinect_test ${PCL_LIBRARIES} segmentation)
I can build the package successfully:
root@milton-All-Series:/data/code2/cpf_segmentation/build# make
Scanning dependencies of target segmentation
[ 16%] Building CXX object CMakeFiles/segmentation.dir/src/segmentation.cpp.o
[ 33%] Building CXX object CMakeFiles/segmentation.dir/gco-v3.0/maxflow.cpp.o
[ 50%] Building CXX object CMakeFiles/segmentation.dir/gco-v3.0/LinkedBlockList.cpp.o
[ 66%] Building CXX object CMakeFiles/segmentation.dir/gco-v3.0/GCoptimization.cpp.o
[ 83%] Building CXX object CMakeFiles/segmentation.dir/gco-v3.0/graph.cpp.o
Linking CXX shared library libsegmentation.so
[ 83%] Built target segmentation
Scanning dependencies of target segmentation_test
[100%] Building CXX object CMakeFiles/segmentation_test.dir/src/segmentation_test.cpp.o
Linking CXX executable segmentation_test
[100%] Built target segmentation_test
Hi, Sorry for late reply. I guess the compilation error is due to the linking error of thread library, one reference is http://stackoverflow.com/questions/26526553/error-during-make-error-adding-symbols-dso-missing-from-command-line
Indeed, the program segmentation_kinect_test uses cloud mutex to read data from kinect sensor. That explained why the error has gone when you were not compiling segmentation_kinect_test.
Hope this helps.
Cheers, Trung
Thanks @trungtpham , The solution is to: modify CMakeLists.txt line 45 as: target_link_libraries (segmentation_kinect_test ${PCL_LIBRARIES} pthread segmentation)
Hi, @trungtpham ,
I got the following make error. I had compiled and installed pcl 1.8.
Could you suggest me how to fix it?
THX~