Search code examples
iphoneioseventkitundefined-symbol

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>

Solution

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