Linker command failed with Undefined symbols for architecture i386

时光毁灭记忆、已成空白 提交于 2019-11-29 12:55:39

问题


i am trying to do the half page curl feature. This is the code I am using:

#import <QuartzCore/QuartzCore.h>


CATransition *animation = [CATransition animation];
[animation setDelegate:self];
[animation setDuration:1.0f];
[animation setTimingFunction:UIViewAnimationCurveEaseInOut];
[animation setType:(notCurled ? @"mapCurl" : @"mapUnCurl")];
[animation setRemovedOnCompletion:NO];
[animation setFillMode: @"extended"];
[animation setRemovedOnCompletion: NO];
notCurled = !notCurled;

But I encounter the following errors

Undefined symbols for architecture i386:
  "_OBJC_CLASS_$_CATransition", referenced from:
      objc-class-ref in MyMapViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)


  "_OBJC_CLASS_$_CATransition", referenced from:


      objc-class-ref in SJMapViewController.o


ld: symbol(s) not found for architecture i386


clang: error: linker command failed with exit code 1 (use -v to see invocation)

How can I solve it?


回答1:


your app is complaining it can not find CATransition Symbol.

Did you add the QuartzCore framework to your app?

If not add it: go to your target settings -> build phases -> link binary -> select the + button and select QuartzCore.

then import it where you need to use it:

      #import <QuartzCore/QuartzCore.h>


来源:https://stackoverflow.com/questions/8471817/linker-command-failed-with-undefined-symbols-for-architecture-i386

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!