sinaweibosdk / weibo_ios_sdk

新浪微博 IOS SDK
http://weibo.com
Other
1.45k stars 565 forks source link

Compile Error #343

Closed lteu closed 4 years ago

lteu commented 7 years ago

Undefined symbols for architecture arm64: "_OBJCCLASS$_PHAsset", referenced from: objc-class-ref in libWeiboSDK.a(WBImageObject.o) objc-class-ref in libWeiboSDK.a(WBNewVideoObject.o) "_OBJCCLASS$_PHAssetChangeRequest", referenced from: objc-class-ref in libWeiboSDK.a(WBImageObject.o) objc-class-ref in libWeiboSDK.a(WBNewVideoObject.o) "_OBJCCLASS$_PHPhotoLibrary", referenced from: objc-class-ref in libWeiboSDK.a(WBImageObject.o) objc-class-ref in libWeiboSDK.a(WBNewVideoObject.o) ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

根据PDF进行的配置,4个包都拉进去了,other link flag 改了,framework都加入了,但是build的时候出现以上crash信息。望回复。万谢!

u8621011 commented 7 years ago

這訊息看起來好像跟我遇到的 xamarin binding 類似。

https://github.com/sinaweibosdk/weibo_ios_sdk/issues/342

這在 ios 上是不是代表他少 static link 一些 symbol 到 libWeiboSDK.a 內??

lteu commented 7 years ago

我的感觉是,开发者更新SDK版本时代码没有清理好导致的。。。

dogoodthing commented 5 years ago

解决方式:比照官方demo你会发现你的build phases里少了个photos.framework!!!加上运行无报错.

https://blog.csdn.net/Fantasy_Jun/article/details/78111403