无法链接ALAssetsLibrary

时间:2012-06-23 20:10:06

标签: ios5 alassetslibrary

我正在努力在我的代码中链接ALAssetsLibrary。

我已经搜索了很多内容,并且在最后一个点后面有多个教程,但我仍然是我开始的地方。

Ld /Users/vedprakash/Library/Developer/Xcode/DerivedData/PickThumb-gmvprlkgmgexedeojbaoeidbadnw/Build/Products/Debug-iphonesimulator/PickThumb.app/PickThumb normal i386
    cd "/Users/vedprakash/Documents/XCode Projects/PickThumb"
    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/vedprakash/Library/Developer/Xcode/DerivedData/PickThumb-gmvprlkgmgexedeojbaoeidbadnw/Build/Products/Debug-iphonesimulator -F/Users/vedprakash/Library/Developer/Xcode/DerivedData/PickThumb-gmvprlkgmgexedeojbaoeidbadnw/Build/Products/Debug-iphonesimulator -filelist /Users/vedprakash/Library/Developer/Xcode/DerivedData/PickThumb-gmvprlkgmgexedeojbaoeidbadnw/Build/Intermediates/PickThumb.build/Debug-iphonesimulator/PickThumb.build/Objects-normal/i386/PickThumb.LinkFileList -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -Xlinker -no_implicit_dylibs -D__IPHONE_OS_VERSION_MIN_REQUIRED=50000 -framework UIKit -framework Foundation -framework CoreGraphics -o /Users/vedprakash/Library/Developer/Xcode/DerivedData/PickThumb-gmvprlkgmgexedeojbaoeidbadnw/Build/Products/Debug-iphonesimulator/PickThumb.app/PickThumb

Undefined symbols for architecture i386:
  "_OBJC_CLASS_$_ALAssetsLibrary", referenced from:
      objc-class-ref in PickThumbViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

2 个答案:

答案 0 :(得分:35)

您需要将AssetsLibrary框架添加到PickThumb目标的“Link Binary With Libraries”构建阶段。

How to "add existing frameworks" in Xcode 4?

答案 1 :(得分:0)

在Xcode 10.2中,我刚刚添加了

AssetsLibrary.fraework

在“目标>构建阶段”>“将二进制文件与库链接”部分