Addressbook链接器错误:体系结构i386的未定义符号 [英] Addressbook linker error: Undefined symbols for architecture i386

查看:125
本文介绍了Addressbook链接器错误:体系结构i386的未定义符号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我使用 __ bridge_transfer __ bridge

- (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker
      shouldContinueAfterSelectingPerson:(ABRecordRef)person 
{
    NSString* nameFirst = (__bridge_transfer NSString *)ABRecordCopyValue(person,
                                                   kABPersonFirstNameProperty);       
    NSString* nameLast = (__bridge_transfer NSString *)ABRecordCopyValue(person, kABPersonLastNameProperty);
    _sight.contactName = [NSString stringWithFormat:@"%@ %@", nameFirst, nameLast];

    [self dismissModalViewControllerAnimated:YES];
    return NO;
}

以上代码产生以下错误:

Code above produces an error below:

Ld /Users/atencion/Library/Developer/Xcode/DerivedData/My_Guides-bgsawzdhvfxryifctnadtvdzotfx/Build/Products/Debug-iphonesimulator/Guides.app/Guides normal i386
    cd "/Users/atencion/Documents/Applications Development/Xcode Projects/Guides"
    setenv MACOSX_DEPLOYMENT_TARGET 10.6
    setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk -L/Users/atencion/Library/Developer/Xcode/DerivedData/My_Guides-bgsawzdhvfxryifctnadtvdzotfx/Build/Products/Debug-iphonesimulator -F/Users/atencion/Library/Developer/Xcode/DerivedData/My_Guides-bgsawzdhvfxryifctnadtvdzotfx/Build/Products/Debug-iphonesimulator -filelist "/Users/atencion/Library/Developer/Xcode/DerivedData/My_Guides-bgsawzdhvfxryifctnadtvdzotfx/Build/Intermediates/My Guides.build/Debug-iphonesimulator/Guides.build/Objects-normal/i386/Guides.LinkFileList" -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -Xlinker -no_implicit_dylibs -D__IPHONE_OS_VERSION_MIN_REQUIRED=50000 -framework AddressBookUI -framework MessageUI -framework Twitter -framework MediaPlayer -framework QuartzCore -framework CoreImage -framework MapKit -framework AudioToolbox -framework AVFoundation -framework MobileCoreServices -framework CoreLocation -framework UIKit -framework Foundation -framework CoreGraphics -framework CoreData -o /Users/atencion/Library/Developer/Xcode/DerivedData/My_Guides-bgsawzdhvfxryifctnadtvdzotfx/Build/Products/Debug-iphonesimulator/Guides.app/Guides

Undefined symbols for architecture i386:
  "_ABRecordCopyValue", referenced from:
      -[ContactInfoViewController peoplePickerNavigationController:shouldContinueAfterSelectingPerson:] in ContactInfoViewController.o
  "_kABPersonFirstNameProperty", referenced from:
      -[ContactInfoViewController peoplePickerNavigationController:shouldContinueAfterSelectingPerson:] in ContactInfoViewController.o
  "_kABPersonLastNameProperty", referenced from:
      -[ContactInfoViewController peoplePickerNavigationController:shouldContinueAfterSelectingPerson:] in ContactInfoViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

添加了Addressbook和AddressbookUI框架......

Addressbook and AddressbookUI frameworks added...

推荐答案

好的,问题是Addressbook框架在我的项目中,但从Project - Summary tab - Linked Frameworks and Libraries中消失了。

OK, the problem was that Addressbook framework was in my project, but dissappeared from "Project"-"Summary tab"-"Linked Frameworks and Libraries".

在我添加框架后,所有问题都消失了。

After I added framework there all problems gone.

这篇关于Addressbook链接器错误:体系结构i386的未定义符号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆