The solution found on the Internet is to increase the path of libboost_system.so
.
Open the terminal first
locate boost_system
//Find the way to find the file in the directory, and then add it to the file path of cmakelist.
/usr/lib/x86_64-linux-gnu/libboost_system.a
/usr/lib/x86_64-linux-gnu/libboost_system.so
/usr/lib/x86_64-linux-gnu/libboost_system.so.1.58.0
locate boost_filesystem
// find the directory
/usr/lib/x86_64-linux-gnu/libboost_filesystem.a
/usr/lib/x86_64-linux-gnu/libboost_filesystem.so
/usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.58.0
Then
Link library in CMakeLists
file
target_link_libraries(pcd2bin ${PCL_COMMON_LIBRARIES} ${PCL_IO_LIBRARIES}
/usr/lib/x86_64-linux-gnu/libboost_system.a
/usr/lib/x86_64-linux-gnu/libboost_system.so
/usr/lib/x86_64-linux-gnu/libboost_system.so.1.58.0)
The problem is solved, you can use this to understand the general writing of CMakeLists
and the compilation process