1

当我尝试编译作为头文件(带有 .h 文件扩展名)的 Gazebo 插件时,它说:

CMake Error: CMake can not determine linker language for target: gazebo_ros_moveit_planning_scene
CMake Error: Cannot determine link language for target "gazebo_ros_moveit_planning_scene".

以下是我的 CMakeLists.txt:

cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
find_package(gazebo REQUIRED)
include_directories(${GAZEBO_INCLUDE_DIRS})
link_directories(${GAZEBO_LIBRARY_DIRS})
list(APPEND CMAKE_CXX_FLAGS "${GAZEBO_CXX_FLAGS}")

add_library(gazebo_ros_moveit_planning_scene SHARED gazebo_ros_moveit_planning_scene.h)
target_link_libraries(gazebo_ros_moveit_planning_scene ${GAZEBO_LIBRARIES})

有什么修复建议吗?

4

0 回答 0