这很艰难。
最近我在iPhone项目中添加了另一个目标来运行命令行工具来创建初始数据库。
从那时起,我在运行iPhone项目时开始出现此错误:
dyld: Library not loaded: /System/Library/Frameworks/CoreGraphics.framework/CoreGraphics
Referenced from: /Users/mm/Apple Development/XCode Projects/GridTest1/build/Release-iphonesimulator/GridTest1.app/GridTest1
Reason: image not found
The Debugger has exited due to signal 5 (SIGTRAP).The Debugger has exited due to signal 5 (SIGTRAP).
奇怪的是,此库似乎已成功加载。
这是dyld生成的一些调试输出:
dyld: loaded: /Xcode3.2.5/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics
dyld: loaded: /Xcode3.2.5/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/System/Library/Frameworks/UIKit.framework/UIKit
检查dyld环境变量,当然框架是否实际存在,一切看起来都很好:
IPHONE_SIMULATOR_ROOT=/Xcode3.2.5/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk
DYLD_ROOT_PATH=/Xcode3.2.5/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk
CoreGraphics.framework在这里吗?......是的。
/Xcode3.2.5/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics
进一步使事情变得神秘:
你可能会说,如果它在Xcode 4中运行正常,为什么不使用它呢?好点,但你知道这些问题怎么会回来困扰你。我现在不想离开这个,然后在提交期间再次出现。
非常感谢任何建议。
顺便说一下,我搜索了无数的列表和帖子以及相关的错误。我也尝试过那里的大部分建议,例如:重新启动Xcode,干净等等。不幸的是它没有帮助。
多年来一直坚持这一点,所以一些帮助会很棒。
干杯, 最大
答案 0 :(得分:0)
您是否在XCode 3(或更早版本)中启动了项目,现在正在使用XCode 4?我不能告诉你,由于苹果公司在过去几年中发布了新版本的XCode,因此框架未被正确引用的挫折次数。共识似乎是删除你的项目并在XCode 4中创建一个新项目。我已经采取过手动编辑XML文件,但最终还是会发生一些奇怪的事情。它可能不是“最佳”答案,但应解决任何奇怪的框架引用问题。
谢谢, 瑞克