Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!nntp.club.cc.cmu.edu!feeder.erje.net!eu.feeder.erje.net!weretis.net!feeder1.news.weretis.net!news.szaf.org!news.gnuher.de!rz.uni-karlsruhe.de!feed.news.schlund.de!schlund.de!news.online.de!not-for-mail From: Philipp Kraus Newsgroups: comp.os.linux.development.system Subject: Re: rpath for library loading Date: Mon, 17 Dec 2012 13:36:54 +0100 Organization: 1&1 Internet AG Lines: 25 Message-ID: References: <8738z5t0wl.fsf@araminta.anjou.terraraq.org.uk> NNTP-Posting-Host: p4fc60b51.dip0.t-ipconnect.de Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Trace: online.de 1355747483 4814 79.198.11.81 (17 Dec 2012 12:31:23 GMT) X-Complaints-To: abuse@einsundeins.com NNTP-Posting-Date: Mon, 17 Dec 2012 12:31:23 +0000 (UTC) User-Agent: Unison/2.1.10 Xref: csiph.com comp.os.linux.development.system:483 On 2012-12-17 11:42:50 +0100, Richard Kettlewell said: > Philipp Kraus writes: >> I hope somebody can explain me a little bit the loader process for >> shared libraries. I have got a library "libmylib.so", this depends on >> some other libs. I have set the rpath to "./". If I run "ldd >> libmylib.so" all depend libraries will be found. I do not need to >> setup any environment variables. All *.so files are in the same >> directory. >> >> If I load my "libmylib.so" in my application I get an error that the >> depend libraries are not found. IMHO the rpath flag tells the library >> in which directory the library should be found, so in my case rpath is >> "./" the library should be found relative to "libmylib.so" eg: > > An rpath of . means it looks in the current directory at the time of > execution, not in the same location as the object containing the rpath. That's bad. Can I add a flag that the rpath should be relative to the other DLL? Under OSX I use @loader_path Thanks Phil