我已经尝试安装并将PointCloud Library添加到我的Project中,但我总是遇到链接器错误。这是我的Cmake文件:
cmake_minimum_required(VERSION 2.8)
project(OpenCV-BATest)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
set(SOURCES regression.h)
find_package(Qt5Core)
find_package( OpenCV REQUIRED )
find_package(PCL 1.3 REQUIRED COMPONENTS common io)
include_directories(${PCL_INCLUDE_DIRS})
INCLUDE_DIRECTORIES(${OpenCV_INCLUDE_DIRS})
add_executable(${PROJECT_NAME} "main.cpp")
target_link_libraries(${PROJECT_NAME} Qt5::Core ${OpenCV_LIBS} ${PCL_COMMON_LIBRARIES} ${PCL_IO_LIBRARIES})
答案 0 :(得分:1)
找到答案,这应该包括在内
target_link_libraries(${PROJECT_NAME} Qt5::Core ${OpenCV_LIBS} ${PCL_LIBRARIES})
代替。