On Tue, Dec 14, 2010 at 7:02 PM, Andy Somerville wrote: > I've been creating a sample project to get myself comfortable with the > nodelet/pluginlib context lately. In doing so I've come across the > following problem: > > When running my nodelet it fails to start with the an error message > indicating it's having trouble locating a symbol within one of its > dependencies: > >    /opt/ros/cturtle/stacks/common/nodelet/bin/nodelet: symbol lookup > error: /home/somervil/Projects/rdk2context/stacks/video_nodelet/lib/libvideonodelet.so: > undefined symbol: > _Z20usb_cam_camera_startPKc17usb_cam_io_method20usb_cam_pixel_formatii > > and then > > I know the following: >  * My nodelet is dependent on usb_cam which I have listed as a > dependency in the manifest. >  * libusb_cam.so is where the offending undefined symbol should live. >  * libusb_cam.so has been build and exists in usb_cam/lib >  * usb_cam is in the ROS_PACKAGE_PATH >  * usb_cam is exporting it's relevant path > > It's unclear to me how the nodelet/plugin system would be aware of a > nodelet's dependencies, and where to look for them, thus explaining > the problem I'm seeing. But since I haven't seem other people raise > the issue, I imagine I must be doing something wrong. > > The only think I can imagine is that I'm supposed to be passing the > dependencies to the nodelets manager but in looking in the nodelet > code, that doesn't seem to be correct. > > > > TL;DR: Does anyone know how to supply the nodelet manager with the > info it needs to resolve symbols from dependencies? > > >     Andy Somerville > I've found a solution, but I'm wondering if it's the "correct" solution considering that ros' build system normally handles dependencies through manifest.xml Adding the line: target_link_libraries(videonodelet usb_cam) to my CMakeLists.txt causes the libvideonodelet.so library to link in info for ubs_cam. Anyone know if this is the preferred way or if there's a more automatic solution? Andy