升级到 XCode 3.2.3 后重新定义时出现错误
我最近升级到 Snow Leopard 和 Xcode 3.2.5,以便可以在 iPod Touch 和 iPhone 上进行测试,但我正在处理的项目遇到了一些问题。首先它找不到 Base SDK,然后我的旧框架无法正确连接。最后,将项目格式设置为 Xcode 3.1 兼容(3.2 也可以)并将所有配置的 Base SDK 设置为 iOS 4.2,然后将我的 iOS 部署目标设置为 iOS 3.0,我能够让系统找到 Base SDK 并尝试建造。那时框架不想合作。 4/6 我使用的是红色显示的,所以我重新路由了 iPhone 模拟器 4.2 平台的路径,该平台工作得很好。我能够构建我的项目,没有错误或警告,并且我的应用程序运行良好。昨晚我去上班以为我已经解决了问题。今天早上,我启动笔记本电脑并去构建我的代码库,现在有 1142 个错误,所有这些错误都与我尚未编写的被视为已重新定义的代码有关。建议?以下只是错误列表的一小部分(显然不需要看到全部1142)
//Frameworks/Foundation.framework/Headers/NSZone.h:48: error: redefinition of 'NSMakeCollectable'
/Frameworks/Foundation. Framework/Headers/NSObject.h:65:错误:类“NSObject”的重复接口声明
/Frameworks/Foundation.framework/Headers/NSObject.h:67:错误:重新定义“struct NSObject”
I recently upgraded to Snow Leopard and Xcode 3.2.5 so I could test on my iPod Touch and iPhone and ran into some problems with the project I was working on. First it couldn't find a Base SDK, then my old frameworks weren't hooking up correctly. Finally after setting the Project Format to Xcode 3.1 compatible (3.2 also worked) and the Base SDK for all configurations to iOS 4.2, then setting my iOS deployment target to iOS 3.0 I was able to get the system to find a Base SDK and attempt a build. That's when the frameworks didn't want to cooperate. 4/6 I'm using displayed in red, so I re routed the path to the iPhone simulator 4.2 platform which worked perfectly. I was able to build my project, no errors or warnings and my app worked fine. I went to work last night thinking I had fixed the problem. This morning I fired up the laptop and went to build my code base and now have 1142 errors all of which have to do with code I haven't written deemed as being redefined. Suggestions? The following is just a small sample of the error list (obviously don't need to see all 1142)
//Frameworks/Foundation.framework/Headers/NSZone.h:48: error: redefinition of 'NSMakeCollectable'
/Frameworks/Foundation.framework/Headers/NSObject.h:65: error: duplicate interface declaration for class 'NSObject'
/Frameworks/Foundation.framework/Headers/NSObject.h:67: error: redefinition of 'struct NSObject'
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
因此,我最终从项目中删除了所有框架并将它们重新添加为现有框架,然后清理所有目标并且它起作用了。
So I ended up deleting all frameworks from the project and re adding them as existing frameworks, then cleaning all targets and it worked.