[ros-users] Linking to packages with shared libraries

Josh Faust jfaust at willowgarage.com
Tue Aug 24 18:19:11 UTC 2010


opencv2's manifest exports -Wl,-rpath,${prefix}/opencv/lib, so your binary's
rpath should include the path to the opencv lib.  What does "readelf -d
<your binary> | grep RPATH" output?

Josh

On Tue, Aug 24, 2010 at 7:23 AM, Nicholas Butko <nbutko at ucsd.edu> wrote:

> How do packages tell other packages to add them to the *runtime* dynamic
> library path?
>
> I built the opencv2 package, and then made a package that depended on it.
> In the dependent package I made a simple HelloWorld that gets and displays
> images from the camera. Everything built correctly, but the binary wouldn't
> run because the shared library was not loaded.
>
> I manually modified my global shared library path (in .bashrc) to include
> opencv2's lib directory, and then my program ran fine. But it would be
> better if I didn't have to manually hack my shared library path for every
> package with shared libraries.
>
> Is there a good solution to this problem?
>
> --Nick
> _______________________________________________
> ros-users mailing list
> ros-users at code.ros.org
> https://code.ros.org/mailman/listinfo/ros-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ros.org/pipermail/ros-users/attachments/20100824/d8829c9b/attachment-0003.html>


More information about the ros-users mailing list