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: messing with linkage



On Thu, Feb 26, 2004 at 10:04:32PM -0500, Carl Lindberg wrote:
} On Thursday, February 26, 2004, at 03:27 PM, Gregory Seidman wrote:
}
} >I have a program which links to several dylibs. If it matters, it's all
} >flat namespace. When it linked, each dylib's install name was either
} >@excutable_path/<libname> or /full/path/to/<libname>. I now want to put
} >these dylibs into App.app/Contents/Frameworks and set their install
} >names to be @executable_path/../Frameworks/<libname>, and I do so with
} >install_name_tool. The problem is that, as otool -L reports, the linked
} >program is looking for the libraries where it found them at link time,
} >rather than in Frameworks.
} >
} >I want to change the paths the executable uses to
} >@executable_path/../Frameworks/<libname> just as I changed the dylibs'
} >install names. I haven't found a tool to do it. Is there a way
} >(preferably
} >an existing tool) to, effectively, relink a program? Or just change the
} >paths it has stored?
}
} Wouldn't you just use install_name_tool on the executable itself?
}
} install_name_tool -change /full/path/to/mylib
} @executable_path/../Frameworks/mylib App.app/Context/MacOS/App

Oh, cool! I didn't realize that worked on executable linkage. That's
exactly what I was looking for. Thank you!

} -Carl Lindberg
--Greg
_______________________________________________
darwin-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-development
Do not post admin requests to the list. They will be ignored.


References: 
 >Re: messing with linkage (From: Carl Lindberg <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.