【发布时间】:2018-07-19 00:12:59
【问题描述】:
我在 catkin_make 我的工作区时收到此错误:
[100%] Linking CXX executable /home/ankilp/test_ws/devel/lib/lidar_depth/lidar_depth
/usr/bin/ld: cannot find -lQt5::Widgets
这是我的 CMakeList 文件:
cmake_minimum_required(VERSION 2.8.3)
project(lidar_depth)
## Compile as C++11, supported in ROS Kinetic and newer
add_compile_options(-std=c++11)
find_package(catkin REQUIRED COMPONENTS
roscpp
rospy
std_msgs
genmsg
)
find_package( PCL REQUIRED)
find_package(Qt4 COMPONENTS QtCore QtGui REQUIRED)
include(${QT_USE_FILE})
add_definitions(-DQT_NO_KEYWORDS)
catkin_package(
)
###########
## Build ##
###########
## Specify additional locations of header files
## Your package locations should be listed before other locations
include_directories(
# include
${catkin_INCLUDE_DIRS}
${PCL_INCLUDE_DIRS}
)
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})
add_executable(${PROJECT_NAME} src/LidarDepth.cpp src/Projection_matrices.hpp)
target_link_libraries(${PROJECT_NAME}
${catkin_LIBRARIES}
${PCL_LIBRARIES}
${QT_LIBRARIES}
)
我没有明确使用与 Qt 相关的任何内容。我单独安装了 Qt5,但问题仍然存在。是否有单独的流程将 Qt 链接到我的系统?
【问题讨论】:
-
您使用的是 ROS Kinetic 和 Ubuntu 16.04 吗?
标签: ros