
lighthouse.framework/ Versions/ A/ Frameworks/ RegexKit.framework lighthouse
但是,当我尝试运行使用lighthouse.framework(我的框架)的应用程序时,我收到以下错误:
dyld: library not loaded: @executable_path/../Frameworks/RegexKit.framework/Versions/A/RegexKit
Referenced from: /Users/mdippery/Developer/Projects/Current/lighthouse/build/DeBUG/lighthouse.framework/Versions/A/lighthouse
Reason: image not found
显然,加载器没有找到RegexKit.
这是装载机希望加载的路径,礼貌otool:
build/DeBUG/lighthouse.framework/Versions/A/lighthouse: /Users/mdippery/library/Frameworks/lighthouse.framework/Versions/A/lighthouse (compatibility version 1.0.0,current version 1.0.0) /System/library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0,current version 12.0.0) @executable_path/../Frameworks/RegexKit.framework/Versions/A/RegexKit (compatibility version 0.4.0,current version 0.6.0) /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0,current version 1.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0,current version 111.1.4) /usr/lib/libobjc.A.dylib (compatibility version 1.0.0,current version 227.0.0) /System/library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0,current version 476.19.0) /System/library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0,current version 677.26.0)
我可以在另一个框架中包含框架吗?这是正确的方法吗?我该如何解决我的错误?
解决方法 最简单的方法是使用@rpath.您的配置应如下所示:>将RegExKit.framework的安装目录设置为@rpath
>将lighthouse.frameworks的安装目录设置为@rpath
>将lighthouse.framework的Runpath搜索路径设置为@ loader_path / Frameworks
>确保将RegExKit.framework复制到lighthouse.framework的Framework子文件夹中(为此使用自定义构建阶段)
最后,任何链接到lighthouse.framework的应用程序都应将Runpath搜索路径设置为@loader_path /../ Frameworks
总结以上是内存溢出为你收集整理的objective-c – 我可以在另一个框架中包含一个框架吗?全部内容,希望文章能够帮你解决objective-c – 我可以在另一个框架中包含一个框架吗?所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)