mzh_zju
2018-11-10 06:25ubuntu 跑pcl程序的时候,cmake发现了boost,但是make的时候还是报错提示boost_system无法加载
5这个是cmake的语句
cmake -lboost_system -lboost_thread ..
这个是cmake的结果前后部分(中间截了)
-- Eigen found (include: /usr/include/eigen3, version: 3.3.4)
-- Boost version: 1.65.1
-- Found the following Boost libraries:
-- system
-- filesystem
-- thread
-- date_time
-- iostreams
-- serialization
-- chrono
-- atomic
-- regex
.......
** WARNING ** io features related to pcap will be disabled
** WARNING ** io features related to png will be disabled
** WARNING ** io features related to libusb-1.0 will be disabled
-- looking for PCL_SIMULATION
-- Boost version: 1.65.1
-- Found the following Boost libraries:
-- system
-- filesystem
-- thread
-- chrono
-- date_time
-- atomic
-- Configuring done
-- Generating done
这个是make的结果
/usr/bin/x86_64-linux-gnu-ld: CMakeFiles/mesh.dir/meshtest.cpp.o: undefined reference to symbol '_ZN5boost6system15system_categoryEv'
//usr/lib/x86_64-linux-gnu/libboost_system.so.1.65.1: 无法添加符号: DSO missing from command line
这个是cmakelists
cmake_minimum_required(VERSION 3.3)
project(meshtest CXX)
find_package(PCL 1.8 REQUIRED)
find_package(Boost REQUIRED COMPONENTS system filesystem thread)
if (NOT Boost_FOUND)
message("未发现Boost")
endif()
include_directories(${PCL_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS})
link_directories(${PCL_LIBRARY_DIRS} ${Boost_LIBRARY_DIR})
add_definitions(${PCL_DEFINITIONS})
add_executable(mesh meshtest.cpp)
target_link_libraries(mesh ${PCL_COMMON_LIBRARIES} ${PCL_IO_LIBRARIES})
- 点赞
- 回答
- 收藏
- 复制链接分享
1条回答
为你推荐
- PCL1.10.0+VS2019 运行出现数组超限
- c++
- visual studio
- 1个回答
- 如何利用矩阵乘法快速幂求斐波那契数列前n项和?
- c++
- 1个回答
- Xamarin&Golang-{[]}无效字符'\ x00'寻找对象密钥字符串的开头
- json
- 2个回答
- PCL可视化点云中怎样添加一个colorbar
- 可视化
- qt 3d
- 1个回答
- pcl点云数据的线特征提取的方案
- pcl点云库
- 点云数据
- 2个回答
换一换