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

For fuerte you have to add to your manifest.xml of the lib package:

 <export>
  <cpp cflags="-I${prefix}/include"
        lflags="-Wl,-rpath,${prefix}/lib -L${prefix}/lib -lyour_lib"/>
  </export>

if your headers are placed in the include subfolder for the lib package and the library you creates using rosbulid_add_library is named your_lib like:

rosbuild_abb_library( your_lib src1.cpp src2.cpp )

Your your depenign packages will be automatically compiled against the headers and linked against the lib.

Note: For catkin (groovy and above) the workaround is slightly different. You do not need this in the package.xml but have to use the catkin_package cmake comand in the CMakeLists.txt of your lib package.........