碧霜寒冰
碧霜寒冰
  • 发布:2018-12-20 18:57
  • 更新:2019-03-11 12:21
  • 阅读:305

【已解决】iOS 升级最新SDK后,编译不通过报一下错误

分类:5+ SDK
Ld /Users/user/Library/Developer/Xcode/DerivedData/HelloH5-avhhgrfhvctorgcbvekljzhnhoxh/Build/Products/Debug-iphoneos/HelloH5.app/HelloH5 normal arm64 (in target: HelloH5)  
    cd /Volumes/VMware\ Shared\ Folders/共享文件/IOS-SDK@20181212/HelloH5  
    export IPHONEOS_DEPLOYMENT_TARGET=9.0  
    /Users/user/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch arm64 -isysroot /Users/user/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk -L/Users/user/Library/Developer/Xcode/DerivedData/HelloH5-avhhgrfhvctorgcbvekljzhnhoxh/Build/Products/Debug-iphoneos -L/Volumes/VMware\ Shared\ Folders/共享文件/IOS-SDK@20181212/HelloH5/../SDK/libs -L/Volumes/VMware\ Shared\ Folders/共享文件/IOS-SDK@20181212/HelloH5/VPNSDK/SafeConnectSDK -F/Users/user/Library/Developer/Xcode/DerivedData/HelloH5-avhhgrfhvctorgcbvekljzhnhoxh/Build/Products/Debug-iphoneos -F/Users/user/Downloads/Xcode.app/Contents/Developer/Library/Frameworks -F/Volumes/VMware\ Shared\ Folders/共享文件/IOS-SDK@20181212/HelloH5/../SDK/libs -filelist /Users/user/Library/Developer/Xcode/DerivedData/HelloH5-avhhgrfhvctorgcbvekljzhnhoxh/Build/Intermediates.noindex/HelloH5.build/Debug-iphoneos/HelloH5.build/Objects-normal/arm64/HelloH5.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -miphoneos-version-min=9.0 -dead_strip -Xlinker -object_path_lto -Xlinker /Users/user/Library/Developer/Xcode/DerivedData/HelloH5-avhhgrfhvctorgcbvekljzhnhoxh/Build/Intermediates.noindex/HelloH5.build/Debug-iphoneos/HelloH5.build/Objects-normal/arm64/HelloH5_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -fobjc-link-runtime -Objc -all_load -llibAdSupport -framework Contacts -llibMap -lPushSDK -lUPPayPlugin -llibOauth -framework MapKit -framework NetworkExtension -weak_framework UserNotifications -weak_framework UserNotificationsUI -framework CoreData -framework CoreGraphics -framework Foundation -framework UIKit -framework QuickLook -framework CoreMotion -framework CFNetwork -framework Security -framework SystemConfiguration -framework JavaScriptCore -framework WebKit -lASIHttpRequest -lcoreSupport -lJSONKit -llibAccelerometer -llibBarcode -llibCache -llibCamera -llibContacts -llibIO -llibLog -llibMedia -llibMessage -llibNativeObj -llibNativeUI -llibNavigator -lcrypto -llibOrientation -llibPGInvocation -llibPGProximity -llibPush -llibShare -llibSpeech -llibStorage -llibUI -llibWebNavi -llibXHR -llibZip -lopencore-amrnb -lmp3lame -lSDWebImage -lTouchJSON -llibPDRCore -lc   -lstdc   -licucore -lz -lxml2 -lstdc  .6 -liconv.2 -lsqlite3.0 -lssl -framework CoreBluetooth -framework ImageIO -framework AssetsLibrary -framework CoreLocation -framework OpenGLES -lSafeConnectSDK -framework Accounts -framework Social -framework AddressBookUI -framework MessageUI -framework AVFoundation -framework AddressBook -framework AudioToolbox -framework MediaPlayer -framework CoreTelephony -framework CoreVideo -framework CoreMedia -framework MobileCoreServices -Xlinker -dependency_info -Xlinker /Users/user/Library/Developer/Xcode/DerivedData/HelloH5-avhhgrfhvctorgcbvekljzhnhoxh/Build/Intermediates.noindex/HelloH5.build/Debug-iphoneos/HelloH5.build/Objects-normal/arm64/HelloH5_dependency_info.dat -o /Users/user/Library/Developer/Xcode/DerivedData/HelloH5-avhhgrfhvctorgcbvekljzhnhoxh/Build/Products/Debug-iphoneos/HelloH5.app/HelloH5  

ld: warning: arm64 function not 4-byte aligned: _ffi_call_SYSV from /Volumes/VMware Shared Folders/共享文件/IOS-SDK@20181212/SDK/libs/liblibPGInvocation.a(sysv_arm64.o)  
ld: warning: arm64 function not 4-byte aligned: _ffi_closure_SYSV from /Volumes/VMware Shared Folders/共享文件/IOS-SDK@20181212/SDK/libs/liblibPGInvocation.a(sysv_arm64.o)  
Undefined symbols for architecture arm64:  
  "_OBJC_CLASS_$_SKStoreProductViewController", referenced from:  
      objc-class-ref in liblibPDRCore.a(DCH5ScreenAdvertising.o)  
  "_SKStoreProductParameterITunesItemIdentifier", referenced from:  
      -[DCH5ScreenAdvertising touchesEnded:withEvent:] in liblibPDRCore.a(DCH5ScreenAdvertising.o)  
  "_OBJC_CLASS_$_PHAssetChangeRequest", referenced from:  
      objc-class-ref in liblibCamera.a(TZImageManager.o)  
  "_OBJC_CLASS_$_PHAssetResourceCreationOptions", referenced from:  
      objc-class-ref in liblibCamera.a(TZImageManager.o)  
  "_OBJC_CLASS_$_PHFetchResult", referenced from:  
      objc-class-ref in liblibCamera.a(TZImageManager.o)  
  "_OBJC_CLASS_$_PHAsset", referenced from:  
      objc-class-ref in liblibCamera.a(TZImageManager.o)  
      objc-class-ref in liblibCamera.a(TZPhotoPreviewCell.o)  
  "_OBJC_CLASS_$_PHCollectionList", referenced from:  
      objc-class-ref in liblibCamera.a(TZImageManager.o)  
  "_OBJC_CLASS_$_PHAssetCollection", referenced from:  
      objc-class-ref in liblibCamera.a(TZImageManager.o)  
  "_OBJC_CLASS_$_PHVideoRequestOptions", referenced from:  
      objc-class-ref in liblibCamera.a(TZImageManager.o)  
  "_OBJC_CLASS_$_PHPhotoLibrary", referenced from:  
      objc-class-ref in liblibCamera.a(TZImageManager.o)  
  "_PHImageManagerMaximumSize", referenced from:  
      -[TZImageManager getOriginalPhotoWithAsset:newCompletion:] in liblibCamera.a(TZImageManager.o)  
  "_PHImageResultIsDegradedKey", referenced from:  
      ___95-[TZImageManager getPhotoWithAsset:photoWidth:completion:progressHandler:networkAccessAllowed:]_block_invoke in liblibCamera.a(TZImageManager.o)  
      ___58-[TZImageManager getOriginalPhotoWithAsset:newCompletion:]_block_invoke in liblibCamera.a(TZImageManager.o)  
  "_PHImageCancelledKey", referenced from:  
      ___95-[TZImageManager getPhotoWithAsset:photoWidth:completion:progressHandler:networkAccessAllowed:]_block_invoke in liblibCamera.a(TZImageManager.o)  
      ___58-[TZImageManager getOriginalPhotoWithAsset:newCompletion:]_block_invoke in liblibCamera.a(TZImageManager.o)  
      ___59-[TZImageManager getOriginalPhotoDataWithAsset:completion:]_block_invoke in liblibCamera.a(TZImageManager.o)  
  "_OBJC_CLASS_$_StorageManager", referenced from:  
      objc-class-ref in liblibStorage.a(PGStorage.o)  
  "_OBJC_CLASS_$_PHAssetCreationRequest", referenced from:  
      objc-class-ref in liblibCamera.a(TZImageManager.o)  
  "_OBJC_CLASS_$_PHFetchOptions", referenced from:  
      objc-class-ref in liblibCamera.a(TZImageManager.o)  
  "_PHImageErrorKey", referenced from:  
      ___95-[TZImageManager getPhotoWithAsset:photoWidth:completion:progressHandler:networkAccessAllowed:]_block_invoke in liblibCamera.a(TZImageManager.o)  
      ___58-[TZImageManager getOriginalPhotoWithAsset:newCompletion:]_block_invoke in liblibCamera.a(TZImageManager.o)  
      ___59-[TZImageManager getOriginalPhotoDataWithAsset:completion:]_block_invoke in liblibCamera.a(TZImageManager.o)  
  "_OBJC_CLASS_$_PHImageRequestOptions", referenced from:  
      objc-class-ref in liblibCamera.a(TZImageManager.o)  
  "_PHImageResultIsInCloudKey", referenced from:  
      ___95-[TZImageManager getPhotoWithAsset:photoWidth:completion:progressHandler:networkAccessAllowed:]_block_invoke in liblibCamera.a(TZImageManager.o)  
  "_OBJC_CLASS_$_PHImageManager", referenced from:  
      objc-class-ref in liblibCamera.a(TZAssetCell.o)  
      objc-class-ref in liblibCamera.a(TZImageManager.o)  
      objc-class-ref in liblibCamera.a(TZPhotoPreviewCell.o)  
ld: symbol(s) not found for architecture arm64  
clang: error: linker command failed with exit code 1 (use -v to see invocation)  
2018-12-20 18:57 分享
已邀请:
小权

小权

是的,Feature-ios.xls总是对不上,只能看示例工程对照着去试,很要命。。

DCloud_IOS_CLP

DCloud_IOS_CLP

增加2个系统库:photos.framework 和StoreKit.framework

  • 碧霜寒冰 (作者)

    最好完善一下随SDK更新的Feature-ios.xls需要的依赖,这次升级碰到SDK遇到的依赖库问题都在Feature-iOS.xls中找不到

    2018-12-24 16:14

DCloud_IOS_CLP

DCloud_IOS_CLP

加上这2个库,已经好了对吧

  • 碧霜寒冰 (作者)

    对的,加上这两个库可以的。还有一种方法是加上Photos.framework,然后StoreKit.framework用libAPPay.a/liblibPayment.a,加了后面2个可以不用加StoreKit.framework。
    比较奇怪,会什么会依赖支付接口

    2018-12-24 16:22

  • 碧霜寒冰 (作者)

    只加Photos.framework的报错信息
    ```javascript
    ld: warning: arm64 function not 4-byte aligned: _ffi_call_SYSV from /Volumes/VMware Shared Folders/Share/IOS-SDK@20181212/SDK/libs/liblibPGInvocation.a(sysv_arm64.o)
    ld: warning: arm64 function not 4-byte aligned: _ffi_closure_SYSV from /Volumes/VMware Shared Folders/Share/IOS-SDK@20181212/SDK/libs/liblibPGInvocation.a(sysv_arm64.o)
    Undefined symbols for architecture arm64:
    "_OBJC_CLASS_$_SKStoreProductViewController", referenced from:
    objc-class-ref in liblibPDRCore.a(DCH5ScreenAdvertising.o)
    "_SKStoreProductParameterITunesItemIdentifier", referenced from:
    -[DCH5ScreenAdvertising touchesEnded:withEvent:] in liblibPDRCore.a(DCH5ScreenAdvertising.o)
    ld: symbol(s) not found for architecture arm64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    ```

    2018-12-24 16:26

  • DCloud_IOS_CLP

    libAPPay里有这个StoreKit.framework 库,如果不要支付功能,可以只加StoreKit.framework

    2018-12-24 16:46

要回复问题请先登录注册