尝试从Core Data检索时出错

时间:2011-12-24 17:17:10

标签: iphone objective-c ios5

我注意到这一行造成了问题

NSManagedObject *newContact = [NSEntityDescription insertNewObjectForEntityForName:@"Contacts" inManagedObjectContext:context];

错误:

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

1 个答案:

答案 0 :(得分:4)

您似乎忘记在项目设置中链接CoreData框架。