Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting "Undefined symbols" when trying to use EventKit?

I am trying to use EventKit based around the doco & SimpleEKDemo application, however I am getting the following single error.

What does this error mean and what steps would be recommended for troubleshooting (first time I've had such a linking error & I'm a bit lost - I've parsed through my code versus teh example code and I can't see any obvious differences).

Undefined symbols:
  "_OBJC_CLASS_$_EKEventStore", referenced from:
      objc-class-ref-to-EKEventStore in AppointmentListController.o
ld: symbol(s) not found
collect2: ld returned 1 exit status

Note that in the header file from the controller I'm using the event kit code I do have:

#import <EventKit/EventKit.h>
#import <EventKitUI/EventKitUI.h>
like image 939
Greg Avatar asked Feb 27 '11 10:02

Greg


People also ask

How do I fix undefined symbol in XCode?

The error Undefined symbols for architecture arm64: "_OBJC_CLASS_$_SKAdImpression" during the iOS build usually happens if XCode or CocoaPods version is lower than required. To fix it update XCode to 12.5 or higher and CocoaPods to 1.10. 0 or higher.

What does undefined symbol mean in XCode?

Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_xxx", referenced from: objc-class-ref in yyy.o. This generally means, you are calling "xxx" (it may be a framework or class) from the class "yyy". The compiler can not locate the "xxx" so this error occurs.


1 Answers

Check if you have added EventKit and EventKitUI frameworks to link with your target?

like image 59
Vladimir Avatar answered Sep 23 '22 08:09

Vladimir