How to link a nodelet to external libraries?
I'm trying to use a nodelet with an external library. But when running the nodelet, it obviously complaints that it can't find some symbol which is in this external library.
I can link the regular node the library without problems. However, when I use the nodelet version, it complains. I'm certain that I'm not linking the nodelet to the library. I don't know how to.
If you know how to link a nodelet to an external library, please share your know-how-to.
The proposed SOLUTION in CMakeLists.txt relevant piece looks like the following:
set(MVIMPACT_LIBRARIES mvDeviceManager)
# Nodelet:
rosbuild_add_library(mv_bluefox_driver_nodelet src/nodelets.cpp src/camera.cpp)
# Linking the nodelet to the mvDeviceManager library
target_link_libraries(mv_bluefox_driver_nodelet ${MVIMPACT_LIBRARIES})
# Regular Node:
rosbuild_add_executable(camera_node src/camera_node.cpp src/camera.cpp)
target_link_libraries(camera_node ${MVIMPACT_LIBRARIES})