对符号'_ZN3pcl7console5printENS0_15VERBOSITY_LEVELEPKcz'的未定义引用
undefined reference to symbol '_ZN3pcl7console5printENS0_15VERBOSITY_LEVELEPKcz'
'我只是想用ROS编译一个程序。我已经链接了所有必要的库,但这个我找不到。我得到的只是代码块中的以下错误(也在 eclipse 中(。
有人知道如何摆脱这个错误吗?甚至需要哪个库?
cmake_minimum_required(VERSION 2.8.3)
project(gpuvoxelgetpointcloud)
find_package(catkin REQUIRED COMPONENTS
cmake_modules
roscpp
rospy
std_msgs
sensor_msgs
cv_bridge
image_transport
pcl_conversions
pcl_ros
)
find_package(icl_core REQUIRED )
find_package(gpu_voxels REQUIRED)
find_package(Boost COMPONENTS system REQUIRED)
find_package(orocos_kdl REQUIRED)
find_package(CUDA REQUIRED)
find_package(PCL 1.7 REQUIRED)
#include <pcl_ros/transforms.h>
#include <pcl/conversions.h>
#include <pcl/PCLPointCloud2.h>
错误是:
对符号的未定义引用
'_ZN3pcl7console5printENS0_15VERBOSITY_LEVELEPKcz'
//use/lib/aarch64_linux-gnu/ libpcl-common.so.1.7: error adding symbols:DSO missing from command line collect2:ld returned 1 exit status.
我在 TX2 上使用 plc,也许手臂上的 plc 有问题。
尝试将以下内容添加到 CMakeLists.txt:
find_package(PCL 1.7 REQUIRED)
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})
include_directories(
${PCL_INCLUDE_DIRS}
)
此外,${PCL_LIBRARIES}
链接到您的目标。在 cpp 代码中包含必要的头文件。
相关文章:
- 对C宏的未定义引用,但在定义它时会出现重新定义错误
- 编译时的 CImg 库返回对"__imp_SetDIBitsToDevice"的未定义引用
- 对Py_Initialize()的未定义引用
- 使用mysql c++连接器的未定义引用
- 对 Scalar ::Scalar() 的未定义引用
- 对复制 CTOR 和 CTOR 的未定义引用
- 对显式实例化的模板函数的未定义引用
- TensorRT (C++ API) 对"createNvOnnxParser_INTERNAL"的未定义引用
- 2个模板化类的非模板友元函数未定义引用错误
- 编译 libfluid 样本控制器时对"event_base_del_virtual"的未定义引用
- 获取对function_name的未定义引用
- 对 'std::thread::_M_start_thread CMake 的未定义引用进行基准测试
- 对结构方法的未定义引用
- 使用内联函数 c++ 的未定义引用
- 对 CMake 中'cudaRegisterLinkedBinary'链接错误的未定义引用?
- 对 DLOPEN 的未定义引用
- QT C++中对全局变量的未定义引用
- 快速数学导致对"__pow_finite"的未定义引用
- 对 boost::system::d etail::system_category_instance 的未定义引用,从
- OpenCV 3.4.3 中对 'cv::String::d eallocate()' 错误的未定义引用