2011-04-25 40 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)。如果是這樣,只需將它們從發現者中刪除並再次嘗試構建。

相關問題