ld: 警告:忽略文件[path],文件中缺少所需的 i386 架构。

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
3个回答

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

2

如果你确定已经正确添加了框架,请查看项目文件夹中是否有一些框架文件夹的副本(例如AddressBookUI)。如果是这样,请从Finder中删除它们,然后再次尝试构建。


0

你需要添加AddressBookUI.framework


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接