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

Try exporting the full path to the archive library from package B, e.g.:

 <export>
   <cpp cflags="-I${prefix}/include" lflags="${prefix}/lib/libB.a"/>
 </export>

That does the trick for me.

To have the correct dependencies setup, CMake needs to know that it's an archive library, instead of a shared library. It can't do this from a -lfoo argument, but it can do it from a full path to libfoo.a. In fact, the emerging best practice for CMake is to always give it the full path to libraries.