【发布时间】:2011-06-25 05:45:06
【问题描述】:
我在 XCode 中遇到了一些奇怪的链接错误。我或多或少了解什么是链接错误,只是不知道为什么它们会出现在我的情况中。
我有一个仅作为 iPhone 启动的应用程序。当我将它调整为通用时,我遇到了一些奇怪的链接错误。然后我简单地创建了一个新的通用项目并导入了文件,它的构建和执行没有错误。现在,使用 iPad 界面,我添加了一些动画并继承了 QuartzCore/QuartzCore.h,但是当我构建时,我得到了链接错误(如下所示)。是什么导致了这种问题,我该如何解决它,以及将来如何避免它?
"_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 框架吗?
-
@Paul R:为什么不让您的评论成为答案?
-
@Marcelo:当时只是猜测,似乎有点太明显了,但显然我错了。 ;-)
标签: ios frameworks linker