Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: linking shared libraries with dependent shared libraries



Yuck, but that worked. In a lot of ways I guess this has advantages because it allows the executables to be more resistant to library path environment attacks. But still, it really complicates the build process relative to the other platforms.

On Oct 12, 2004, at 7:58 PM, Peter O'Gorman wrote:


The dynamic linker (dyld) will not find libraries like this if they are not in one of the default search paths (/lib /usr/lib /usr/local/lib $HOME/lib). I think you need to use install_name_tool(1).


I suggest that you use the -headerpad_max_install_names flag and set the install_name of the libraries to /path/to/build/loc/libname.dylib. Then the libraries can find each other at build time. At install time, you can use the install_name_tool to change the libraries names. If the libs are going to be installed relative to the executable, you should make the install_name @executable_path/rel/path/to/libname.dylib.

Peter
--
Peter O'Gorman - http://www.pogma.com

_______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/email@hidden

This email sent to email@hidden
References: 
 >linking shared libraries with dependent shared libraries (From: Paul Forgey <email@hidden>)
 >Re: linking shared libraries with dependent shared libraries (From: "Peter O'Gorman" <email@hidden>)
 >Re: linking shared libraries with dependent shared libraries (From: Paul Forgey <email@hidden>)
 >Re: linking shared libraries with dependent shared libraries (From: "Peter O'Gorman" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.