0

我正在尝试在我的项目中使用地址框架。我已经在我的项目中链接了框架 AddressBookUI.framework 和 AddressBook.framework。但是在构建应用程序时我仍然收到以下错误。

请帮我弄清楚问题。

Ld "/Users/sathishkumar/Library/Developer/Xcode/DerivedData/Easy_Contacts-eafemguogncacmhgnbfsjtizjcbd/Build/Products/Debug-iphonesimulator/Easy Contacts.app/Easy Contacts" normal i386
    cd "/Users/sathishkumar/projects/Easy Contacts"
    setenv MACOSX_DEPLOYMENT_TARGET 10.6
    setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
        /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk -L/Users/sathishkumar/Library/Developer/Xcode/DerivedData/Easy_Contacts-eafemguogncacmhgnbfsjtizjcbd/Build/Products/Debug-iphonesimulator -F/Users/sathishkumar/Library/Developer/Xcode/DerivedData/Easy_Contacts-eafemguogncacmhgnbfsjtizjcbd/Build/Products/Debug-iphonesimulator -filelist "/Users/sathishkumar/Library/Developer/Xcode/DerivedData/Easy_Contacts-eafemguogncacmhgnbfsjtizjcbd/Build/Intermediates/Easy Contacts.build/Debug-iphonesimulator/Easy Contacts.build/Objects-normal/i386/Easy Contacts.LinkFileList" -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -Xlinker -no_implicit_dylibs -D__IPHONE_OS_VERSION_MIN_REQUIRED=50100 -framework UIKit -framework Foundation -framework CoreGraphics -o "/Users/sathishkumar/Library/Developer/Xcode/DerivedData/Easy_Contacts-eafemguogncacmhgnbfsjtizjcbd/Build/Products/Debug-iphonesimulator/Easy Contacts.app/Easy Contacts"

    Undefined symbols for architecture i386:
      "_ABRecordCopyValue", referenced from:
          -[ViewController displayPerson:] in ViewController.o
      "_ABMultiValueGetCount", referenced from:
          -[ViewController displayPerson:] in ViewController.o
      "_ABMultiValueCopyValueAtIndex", referenced from:
          -[ViewController displayPerson:] in ViewController.o
      "_OBJC_CLASS_$_ABPeoplePickerNavigationController", referenced from:
          objc-class-ref in ViewController.o
      "_kABPersonFirstNameProperty", referenced from:
          -[ViewController displayPerson:] in ViewController.o
      "_kABPersonPhoneProperty", referenced from:
          -[ViewController displayPerson:] in ViewController.o
    ld: symbol(s) not found for architecture i386
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
4

2 回答 2

1

添加<AddressBook/AddressBook.h>到文件中,AddressBookUI 就是那个地址簿 UI。

于 2012-05-20T13:36:10.360 回答
0

您是否将这些框架导入到您的 .h 文件中?

于 2012-05-20T13:28:31.873 回答