ld:警告:忽略文件[path],在文件中缺少必需的体系结构i386

时间:2011-04-25 07:24:20

标签: iphone xcode4 i386

当我尝试运行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

3 个答案:

答案 0 :(得分:2)

由于某种原因,链接器在/Users/Marius/Documents/AppSchool/Telefonbok/中寻找AddressBook.framework和AddressBookUI.framework,而不是在SDK文件夹中。您应该检查是否已将这些框架正确添加到项目中。

答案 1 :(得分:2)

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

答案 2 :(得分:0)

您需要添加AddressBookUI.framework

相关问题