Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compilation wrong #7

Open
pswpswpsw opened this issue Jun 15, 2016 · 3 comments
Open

compilation wrong #7

pswpswpsw opened this issue Jun 15, 2016 · 3 comments

Comments

@pswpswpsw
Copy link

I used your cmake file: https://github.com/daviddoria/Examples/blob/master/c%2B%2B/PCL/Descriptors/PrincipalCurvaturesEstimation/CMakeLists.txt

and https://github.com/daviddoria/Examples/blob/master/c%2B%2B/PCL/Descriptors/PrincipalCurvaturesEstimation/PrincipalCurvaturesEstimation.cpp

It seems that I got error

Linking CXX executable PrincipalCurvaturesEstimation
/usr/bin/ld: CMakeFiles/PrincipalCurvaturesEstimation.dir/PrincipalCurvaturesEstimation.cpp.o: undefined reference to symbol '_ZN5boost6system15system_categoryEv'
//usr/lib/x86_64-linux-gnu/libboost_system.so.1.54.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [PrincipalCurvaturesEstimation] Error 1
make[1]: *** [CMakeFiles/PrincipalCurvaturesEstimation.dir/all] Error 2
make: *** [all] Error 2

Do you know what is going on?

@pswpswpsw
Copy link
Author

I figured it out, at least on my computer, CMakeLists.txt need to add two additional library at the end.

target_link_libraries(PrincipalCurvaturesEstimation
pcl_io
pcl_common
pcl_features
pcl_search
pcl_filters
pcl_kdtree
pcl_surface
pcl_keypoints
boost_thread
boost_system
)

@pswpswpsw
Copy link
Author

pswpswpsw commented Jun 15, 2016

I figured it out, at least on my computer, CMakeLists.txt need to add two additional library at the end.
cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
project(PrincipalCurvaturesEstimation)
find_package(PCL 1.0 REQUIRED COMPONENTS io)
include_directories(${PCL_INCLUDE_DIRS})
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})
add_executable(PrincipalCurvaturesEstimation PrincipalCurvaturesEstimation.cpp)
target_link_libraries(PrincipalCurvaturesEstimation
pcl_io
pcl_common
pcl_features
pcl_search
pcl_filters
pcl_kdtree
pcl_surface
pcl_keypoints
boost_thread
boost_system
)

@daviddoria
Copy link
Owner

Great, I'm glad you got it to work. Would you mind editing the page to reflect the required changes?

@daviddoria daviddoria reopened this Jun 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants