Ios5 无法链接到库

Ios5 无法链接到库,ios5,alassetslibrary,Ios5,Alassetslibrary,我正在努力在代码中链接库 我已经在谷歌上搜索了很多关于这一点的内容,并遵循了不止一个教程直到最后一点,但我仍然是我开始的地方 Ld /Users/vedprakash/Library/Developer/Xcode/DerivedData/PickThumb-gmvprlkgmgexedeojbaoeidbadnw/Build/Products/Debug-iphonesimulator/PickThumb.app/PickThumb normal i386 cd "/Users/ved

我正在努力在代码中链接库

我已经在谷歌上搜索了很多关于这一点的内容,并遵循了不止一个教程直到最后一点,但我仍然是我开始的地方

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)

您需要将
assetsbrary
框架添加到
picktumb
目标的“使用库链接二进制文件”构建阶段


在我刚刚添加的Xcode 10.2中

AssetsLibrary.framework

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

添加后,我收到以下错误:
ld:警告:忽略文件/Users/vedprakash/Documents/XCode Projects/picktumb/AssetsLibrary.framework/AssetsLibrary,该文件是为不受支持的文件格式构建的,而不是所链接的体系结构(i386)
这不是
资产库
框架的正确位置。我认为您没有按照链接中的说明进行操作。我已经添加了链接中的框架,并且库显示在“使用库链接二进制文件”下的列表中。如果添加正确,link命令应显示为
-framework AssetsLibrary
。它不应该有一个以
/AssetsLibrary
结尾的路径。谢谢Rob:)。我删除并添加了库,并成功构建了它。