adding shared objects to catkin package
Hi,
i'm writing a node that has to call some functions from a .so library. The node called test_service_server
has to use functions from libtest.so
. This lib is NOT a catkin lib, it was created outside of ROS entirely.
inside my CMakeLists.txt
i have the following:
include_directories( ${catkin_INCLUDE_DIRS} lib)
set(EXTRALIB_BIN ${PROJECT_SOURCE_DIR}/lib/libtest.so)
add_executable(test_service_server src/test_service_server.cpp)
target_link_libraries( test_service_server ${catkin_LIBRARIES} ${EXTRALIB_BIN})
I still get the error: no rule to make target
.
Can someone give me a few tipps about linking shared objects to catkin packages?
EDIT: Just to explain my problem better: I have a shared object lib with ca 200 functions my node needs. ( in the /lib folder of the package) These functions are described in header files (ca. 10, in the /include folder of the package).
I can't get the source of this library to try and build it as a catkin lib. how do i properly link my .so in CMakeLists.txt?
FYI: found a solution: target_link_libraries( test_service_server ${catkin_LIBRARIES} ${PROJECT_SOURCE_DIR}/lib/libtest.so.1) this use of target link libraries works perfectly, in case someone stumbles upon the question.