install_name_tool -id changes the internal name of the file, you need
to later the path to any externally linked libraries.
So in your case I think you need something like:
install_name_tool -change
"/Developer/Packages/wxWidgets/build-release/lib/wx_baseu-2.9.dylib"
"@rpath/libxw_baseu-2.9.dylib" executable_name
Remember you need to do this for all libraries used by the executable,
and then for all internal library paths used by each library file.
otool -L, will give you a list of all libraries used by the executable
and each library file.
Hope this is some help.
Dion
if you wish to bundle your dynamic libraries into your application, I
believe the easiest way is to use this small
tool I wrote :
http://macdylibbundler.sourceforge.net/
This will allow you to integrate a dynamic library into your application
bundle with a single line on the terminal;
probably much easier that what you're trying to do at this time (or
build wxWidgets as static if you can, of course,
that's still easiest)
-- Auria
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.
To unsubscribe, send email to wx-users+u...@googlegroups.com
or visit http://groups.google.com/group/wx-users
>./change-install-names /Developer/Packages/wxWidgets/build-debug/lib
>@rpath
please note that @rpath is 10.5+ only, @executable_path is working on
earlier systems as well, but needs relative placement to the executable
while @rpath also is useful for bundles
Best,
Stefan
TEN> Pleasantly, but not very surprisingly, I found yet another undocumented
TEN> feature in wxWidgets. A script that is generated after building wx as a
TEN> dynamic library called "change-install-names" that does exactly what I was
TEN> looking for. The script is found in the build-debug (or build-release)
TEN> folder (e.g. /Developer/Packages/wxWidgets/build-debug).
TEN>
TEN> The script is supposed to iterate through all the library files and fixes
TEN> their the ids and paths (couldn't believe my eyes when i found the script
TEN> just lying there in the folder)! However the code in the script needed a
TEN> small fix.
TEN>
TEN> Original Code:
TEN> #!/bin/sh
TEN> libnames=`cd ${1} ; ls -1 | grep '\.[0-9][0-9]*\.dylib$'`
TEN> for i in ${libnames} ; do
TEN> install_name_tool -id ${1}/${i} ${1}/${i}
TEN> for dep in ${libnames} ; do
TEN> install_name_tool -change ${2}/${dep} ${1}/${dep} ${1}/${i}
TEN> done
TEN> done
TEN>
TEN> Fixed Code:
TEN> #!/bin/sh
TEN> libnames=`cd ${1} ; ls -1 | grep '\.[0-9][0-9]*\.dylib$'`
TEN> for i in ${libnames} ; do
TEN> install_name_tool -id ${2}/${i} ${1}/${i}
TEN> for dep in ${libnames} ; do
TEN> install_name_tool -change ${1}/${dep} ${2}/${dep} ${1}/${i}
TEN> done
TEN> done
I don't really understand why is the fix needed. It looks like you mostly
exchanged the first and second parameters but maybe I'm missing something.
FWIW I didn't know about this script too but I did write
misc/scripts/set_install_name which was supposed to do the same thing but
in a bit more user-friendly way. I didn't test it since a long time though,
but it did work back in 2005 when it was written.
Regards,
VZ
--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/
> It needs to be fixed, because the order of the parameters does make a
> difference. The original code will not work.
Did you test with the current trunk or a previous release/snapshot? I
recently applied a patch that makes, IIRC, a similar change to how
install_name_tool is run in that script.
http://trac.wxwidgets.org/changeset/67603/wxWidgets/trunk/configure.in
--
Robin Dunn
Software Craftsman
http://wxPython.org