Using a library created using rosbuild_add_library
I have created a package in ROS which contains my own header files and I have created a library using these header files using rosbuild_add_library
(add_library
in case of Catkin) . I wish to make use of this library in another ROS package. Is it enough to add the package ( containing my library ) to the list of dependency in package.xml (or manifest.xml) of the current package and using target_link_libraries( my_target my_library)
in CMakeLists.txt or do I have to specify the complete path to my library? In other words, do I have to use link_directories(library_directories)
even after adding my former package to the package.xml of the current package?
Pkg1
(package) contains a library foo
. The library has been created using rosbuild_add_library
on one computer and using add_library
(for catkin) on another computer. Pkg2
is the package (created in both computers) in which I want to use the library foo
.
Does
Pkg2
use rosbuild or catkin? Why do you have two versions ofPkg1
on two different computers?