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?<div><br></div>

<div>Josh<br><br><div class="gmail_quote">On Tue, Aug 24, 2010 at 7:23 AM, Nicholas Butko <span dir="ltr"><<a href="mailto:nbutko@ucsd.edu">nbutko@ucsd.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

How do packages tell other packages to add them to the *runtime* dynamic library path?<br>
<br>
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.<br>


<br>
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.<br>


<br>
Is there a good solution to this problem?<br>
<br>
--Nick<br>
_______________________________________________<br>
ros-users mailing list<br>
<a href="mailto:ros-users@code.ros.org">ros-users@code.ros.org</a><br>
<a href="https://code.ros.org/mailman/listinfo/ros-users" target="_blank">https://code.ros.org/mailman/listinfo/ros-users</a><br>
</blockquote></div><br></div>