2011-04-25 97 views
4

当我尝试运行iPhone Simulator时,出现此错误消息。我使用的Xcode 4ld:warning:忽略文件[path],缺少文件中所需的体系结构i386

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 

回答

2

出于某种原因,该接头用在/Users/Marius/Documents/AppSchool/Telefonbok/,而不是在SDK文件夹中寻找AddressBook.framework和AddressBookUI.framework。你应该检查你是否将这些框架正确地添加到了你的项目中。

0

您需要添加AddressBookUI.framework

2

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

相关问题