On Sep 28, 2011, at 3:15 AM, IOhannes m zmoelnig wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 2011-09-27 21:55, Hans-Christoph Steiner wrote:
That's a good break down of the issues. I'll checkout @loader_path. The @executable_path technique has been in Pd-extended for a long time, check out all of the libs in Pd-extended.app/Contents/lib by doing something like:
otool -L /Applications/Pd-extended.app/Contents/lib/libavcodec. 51.dylib
But this still leaves us with Windows and GNU/Linux, right? I think the original idea of setting the LD_LIBRARY_PATH when loading, then unsetting, is a good one. It would be good to have all platforms use the same technique.
seems like my other mail got unnoticed: i find that the LD_LIBRARY_PATH trick does NOT work as expected, as this variable is only evaluated at strttime of the application, and setting it via setenv() seems to not effect dlopen().
Ah, ok, that changes things. So you are sure there isn't a way to make this work? If so, do you think there are other shared library techniques you think could work? Otherwise, it looks like we are back to my original manual dlopen() proposal.
.hc
----------------------------------------------------------------------------
As we enjoy great advantages from inventions of others, we should be glad of an opportunity to serve others by any invention of ours; and this we should do freely and generously. - Benjamin Franklin