4

当我尝试运行 iPhone 模拟器时收到此错误消息。我使用 Xcode 4

    ld: warning: ignoring file /Users/Marius/Documents/AppSchool/Telefonbok/AddressBook.framework/AddressBook, missing required architecture i386 in file
ld: warning: ignoring file /Users/Marius/Documents/AppSchool/Telefonbok/AddressBookUI.framework/AddressBookUI, missing required architecture i386 in file
Undefined symbols for architecture i386:
  "_ABRecordCopyValue", referenced from:
      -[SecondViewController peoplePickerNavigationController:shouldContinueAfterSelectingPerson:] in SecondViewController.o
  "_ABMultiValueCopyValueAtIndex", referenced from:
      -[SecondViewController peoplePickerNavigationController:shouldContinueAfterSelectingPerson:] in SecondViewController.o
  "_OBJC_CLASS_$_ABPeoplePickerNavigationController", referenced from:
      objc-class-ref in SecondViewController.o
  "_kABPersonFirstNameProperty", referenced from:
      -[SecondViewController peoplePickerNavigationController:shouldContinueAfterSelectingPerson:] in SecondViewController.o
  "_kABPersonLastNameProperty", referenced from:
      -[SecondViewController peoplePickerNavigationController:shouldContinueAfterSelectingPerson:] in SecondViewController.o
  "_kABPersonPhoneProperty", referenced from:
      -[SecondViewController peoplePickerNavigationController:shouldContinueAfterSelectingPerson:] in SecondViewController.o
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status
4

3 回答 3

2

For some reason, the linker is looking for AddressBook.framework and AddressBookUI.framework in /Users/Marius/Documents/AppSchool/Telefonbok/ and not in the SDK folders. You should check if you added those frameworks correctly to your project.

于 2011-04-25T07:50:29.290 回答
2

如果您确定正确添加了框架,请查看项目文件夹中是否有一些框架文件夹(例如 AddressBookUI)的副本(在 Xcode 中右键单击您的项目并选择在 Finder 中显示)。如果是这样,只需将它们从 finder 中删除并再次尝试构建。

于 2013-02-15T20:37:45.633 回答
0

您需要添加 AddressBookUI.framework

于 2011-08-30T23:24:13.713 回答