Re: [Fedora-tools-list] how do you link to a different lib location at run time?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Dec 29, 2004 at 10:52:52AM -0500, Robert P. J. Day wrote:
>   other options include working with /etc/ld.so.conf on the new
> system, of course, or using LD_LIBRARY_PATH (although there are
> numerous online essays about why this is a bad idea.)

Are you aware that DT_RPATH may contain "$ORIGIN" which is
the directory in which the executable lives?  Thus if you 
wanted to package stuff like

	/opt/foo/bin/myapp
	/opt/foo/lib/mylib1.so
	/opt/foo/lib/mylib2.so

you can do -Wl,-rpath,'$ORIGIN/../lib'.



r~


[Index of Archives]     [GCC Help]     [Fedora Development]     [Fedora Announce]     [Fedora Legacy Announce]     [Home]     [Fedora Config]     [PAM]     [Red Hat 9]     [Big List of Linux Books]     [Gimp]     [Yosemite News]

  Powered by Linux