catkin_make linking error
Hi All,
I've upgraded to groovy & catkin - unfortunately my own code won't link (One of the beginner tutorial does that I used as a test)
Very similar problems I've looked at here hoping to find a pointer to the solution I get errors like:
undefined reference to `ros::Publisher::~Publisher()'ToeminatorROSBridge.cpp (.text+0x384): undefined reference to `ros::NodeHandle::~NodeHandle()'
CMakeFile is:
cmake_minimum_required(VERSION 2.8.3)
project(toeminator_ros_bridge)
## Find catkin macros and libraries
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
## is used, also find other catkin packages
find_package(catkin REQUIRED COMPONENTS roscpp rospy std_msgs tf geometry_msgs nav_msgs)
## System dependencies are found with CMake's conventions
find_package(Boost REQUIRED COMPONENTS system)
find_package(Boost REQUIRED COMPONENTS thread)
find_package(catkin REQUIRED COMPONENTS message_generation std_msgs sensor_msgs)
generate_messages(
DEPENDENCIES geometry_msgs nav_msgs std_msgs )
## Your package locations should be listed before other locations
include_directories(include ${catkin_INCLUDE_DIRS})
## Declare a cpp executable
add_executable(toeminator_ros_bridge_node src/ToeminatorROSBridge.cpp src/RobotInterface.cpp src/NetworkInterface.cpp )
## Add cmake target dependencies of the executable/library
## as an example, message headers may need to be generated before nodes
# add_dependencies(toeminator_ros_bridge_node toeminator_ros_bridge_generate_messages_cpp)
target_link_libraries(toeminator_ros_bridge_node ${catkin_LIBRARIES})
and extract from package.xml
<buildtool_depend>catkin</buildtool_depend>
<build_depend>geometry_msgs</build_depend>
<build_depend>nav_msgs</build_depend>
<build_depend>roscpp</build_depend>
<build_depend>rospy</build_depend>
<build_depend>std_msgs</build_depend>
<build_depend>tf</build_depend>
<run_depend>geometry_msgs</run_depend>
<run_depend>nav_msgs</run_depend>
<run_depend>roscpp</run_depend>
<run_depend>rospy</run_depend>
<run_depend>std_msgs</run_depend>
<run_depend>tf</run_depend>
Many Thanks
Mark