什么原因导致iOS链接错误? [英] What causes iOS linking errors?

查看:179
本文介绍了什么原因导致iOS链接错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在XCode中遇到了一些奇怪的链接错误。我或多或少地了解链接错误是什么,而不是为什么它们出现在我的情况中。

I've been getting some strange linking errors in XCode. I understand more or less what linking errors are, just not why they are showing up in my situation.

我有一个仅作为iPhone启动的应用程序。当我将其调整为通用时,我得到了一些奇怪的链接错误。然后我简单地创建了一个新的通用项目并导入了文件,它构建并执行时没有错误。现在,使用iPad界面,我添加了一些动画并继承了QuartzCore / QuartzCore.h但是当我构建时,我得到了链接错误(如下所示)。导致此类问题的原因是,我该如何修复它,以及如何在将来避免它?

I have an app that started as iPhone only. When I adjusted it to be universal I got some odd linking errors. I then simply created a new universal project and imported the files, it built and executed without error. Now, working with the iPad interface, I've added some animations and am inheriting QuartzCore/QuartzCore.h but when I build, I get linking errors (shown below). What causes this sort of problem, how can I fix it, and how can I avoid it in the future?

"_OBJC_CLASS_$_CAMediaTimingFunction", referenced from:
objc-class-ref-to-CAMediaTimingFunction in mainViewController_iPad.o

"_OBJC_CLASS_$_CABasicAnimation", referenced from:
objc-class-ref-to-CABasicAnimation in mainViewController_iPad.o

"_kCAMediaTimingFunctionEaseIn", referenced from:
_kCAMediaTimingFunctionEaseIn$non_lazy_ptr in mainViewController_iPad.o
(maybe you meant: _kCAMediaTimingFunctionEaseIn$non_lazy_ptr)

"_OBJC_CLASS_$_CAKeyframeAnimation", referenced from:
objc-class-ref-to-CAKeyframeAnimation in mainViewController_iPad.o

"_OBJC_CLASS_$_CAAnimationGroup", referenced from:
objc-class-ref-to-CAAnimationGroup in mainViewController_iPad.o

"_CATransform3DIdentity", referenced from:
_CATransform3DIdentity$non_lazy_ptr in mainViewController_iPad.o
(maybe you meant: _CATransform3DIdentity$non_lazy_ptr)

ld: symbol(s) not found
collect2: ld returned 1 exit status


推荐答案

您需要添加 QuartzCore.framework

这篇关于什么原因导致iOS链接错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆