ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Make sure that you are including the boost header path in your CMakeLists.txt:

...
find_package(Boost REQUIRED COMPONENTS system thread ...)
...
include_directories(... ${Boost_INCLUDE_DIRS})
...

Make sure that you are including the boost header path in your CMakeLists.txt:

...
find_package(Boost REQUIRED COMPONENTS system thread ...)
...
include_directories(... ${Boost_INCLUDE_DIRS})
...

EDIT:

The ellipses ... are not meant to be used literally, I would modify your CMakeLists.txt to look like this:

cmake_minimum_required(VERSION 2.8.3)
project(toeminator_ros_bridge2)

find_package(Boost REQUIRED COMPONENTS system thread)

find_package(catkin REQUIRED COMPONENTS roscpp rospy std_msgs tf)

catkin_package(
  INCLUDE_DIRS include
  LIBRARIES RobotInterface NetworkInterface
  CATKIN_DEPENDS roscpp rospy std_msgs tf
  DEPENDS Boost
)

include_directories(include ${catkin_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS})

add_library(RobotInterface src/RobotInterface.cpp)
target_link_libraries(RobotInterface ${catkin_LIBRARIES} ${Boost_LIBRARIES})
add_library(NetworkInterface src/NetworkInterface.cpp)
target_link_libraries(NetworkInterface ${catkin_LIBRARIES} ${Boost_LIBRARIES})

add_executable(ToeminatorROSBridge src/ToeminatorROSBridge.cpp)
target_link_libraries(ToeminatorROSBridge
  RobotInterface
  NetworkInterface
  ${catkin_LIBRARIES}
  ${Boost_LIBRARIES}
)

This might be linking somethings unnecessarily, but it should work. Without looking at how each of your libraries and executables are using ROS stuff and Boost I cannot know how to write your build file exactly right.

Make sure that you are including the boost header path in your CMakeLists.txt:

...
find_package(Boost REQUIRED COMPONENTS system thread ...)
...
include_directories(... ${Boost_INCLUDE_DIRS})
...

EDIT:

The ellipses ellipsis ... are not meant to be used literally, I would modify your CMakeLists.txt to look like this:

cmake_minimum_required(VERSION 2.8.3)
project(toeminator_ros_bridge2)

find_package(Boost REQUIRED COMPONENTS system thread)

find_package(catkin REQUIRED COMPONENTS roscpp rospy std_msgs tf)

catkin_package(
  INCLUDE_DIRS include
  LIBRARIES RobotInterface NetworkInterface
  CATKIN_DEPENDS roscpp rospy std_msgs tf
  DEPENDS Boost
)

include_directories(include ${catkin_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS})

add_library(RobotInterface src/RobotInterface.cpp)
target_link_libraries(RobotInterface ${catkin_LIBRARIES} ${Boost_LIBRARIES})
add_library(NetworkInterface src/NetworkInterface.cpp)
target_link_libraries(NetworkInterface ${catkin_LIBRARIES} ${Boost_LIBRARIES})

add_executable(ToeminatorROSBridge src/ToeminatorROSBridge.cpp)
target_link_libraries(ToeminatorROSBridge
  RobotInterface
  NetworkInterface
  ${catkin_LIBRARIES}
  ${Boost_LIBRARIES}
)

This might be linking somethings unnecessarily, but it should work. Without looking at how each of your libraries and executables are using ROS stuff and Boost I cannot know how to write your build file exactly right.