非惰性 ptr 链接错误 - 解决方案
我在尝试构建和构建时收到了很多错误使用 xcode 运行我的 iphone 应用程序。 对于代码中使用的变量,所有错误均指出“非惰性指针”。 对我(以及你们所有人)来说,解决方案是根据代码将运行的模拟器和设备版本寻找要使用的正确框架。 首先,我从 iphone os 2.2 文件夹中选择了 AVFoundation 框架。当我删除它并从 iphone os 3.0 文件夹中选择框架时 - 链接错误消失了并且代码运行完美。 因此,简而言之,解决方案是更改框架源文件夹。 希望有帮助:)
I have received many errors while trying to Build & Run my iphone app using the xcode.
All the errors stated "non lazy ptr" for the used variables in the code.
The solution for me (and for all of you) is to look for the correct framework to be used according to the Simulator and Device versions the code will be running on.
At first i have chosen the AVFoundation framework from the iphone os 2.2 folder. and when i removed that and choose the framework from the iphone os 3.0 folder - the linking errors where gone and the code run perfectly.
so, in short the solution is to change the framework source folder.
Hope that helps :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
框架应自动从 Active SDK 中获取,因此无需重置它们。我们已经看到一些项目以某种方式将 SDK 路径硬编码到其框架搜索路径构建设置中;这通常是导致此问题的原因(并且您的修复只是为无效路径硬编码了一条更新的路径,这会在一段时间内将罐子踢出一段路,但会在下一个 SDK 碰撞中再次中断。)真正的解决方案是查看在目标的框架搜索路径中删除您找到的任何特定于 SDK 的路径。
Frameworks should automatically be taken from the Active SDK, so resetting them shouldn't be necessary. We've seen some projects that have somehow gotten hardcoded SDK paths into their Framework Search Paths build settings; that is often the cause of this problem (and your fix simply hardcodes a more-recent path for an invalid one, which kicks the can down the road a ways but will break again in the next SDK bump.) The real solution is to look at your target's Framework Search Paths and delete any SDK-specific paths you find.