Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
OSX 10.10 优胜美地。 我的应用程序依赖于英特尔 IPP。在编译时它依赖于 2 个 dylib,但这些依赖于其他 dylib,这些 dylib在运行时加载(并且不显示在 otool -L 中)。启动我的应用程序时找不到这些库。
我不明白如何为我的应用程序(或依赖于编译时间的 dylibs)指定一个文件夹来搜索运行时 dylibs 的路径。
据我了解,有必要使用rpath。但是具体应该怎么做呢?如何设置运行时搜索路径?我是否需要为可执行文件或 dylib 设置“rpath”?
我认为您将不得不使用install_name_tool命令来添加 dylib。
install_name_tool
不要以为你可以设置一个文件夹,可以神奇地加载其中的所有 dylib。这违背了代码签名和安全的目的。