我需要使用install_name_tool
重新链接文件。这个文件让我更改其中一个dylib路径,但是当我更改第二个(共7个)时,会出现以下错误:
install_name_tool: changing install names or rpaths can't be redone for: some/library (for architecture i386) because larger updated load commands do not fit (the program must be relinked, and you may need to use -headerpad or -headerpad_max_install_names)
在谷歌搜索后,我发现文件中没有足够的空间来容纳新路径,我或许可以使用ld
工具或者libtool
来解决这个问题。然而,我不知道该如何操作。因为我没有这个库的源代码,所以我不能重新编译它。
有任何方法能够更新这个文件的所有dylib路径吗?非常感谢您的帮助!
我的系统是osx 10.10
我使用的命令是:install_name_tool -change old/dylib/path.dylib new/dylib/path.dylib file/to/update