-all_load导致第三方库问题记录

今天pod安装了阿里云短视频相关SDK报错:
uplicate symbol '_main' in:
/Users/xxx/Library/Developer/Xcode/DerivedData/xxx-bvtgunydcfbkwhdeqbtsnbtjrumw/Build/Intermediates.noindex/xxx.build/Debug_Official-iphoneos/xxx.build/Objects-normal/arm64/main.o
/Users/xxx/Desktop/SVN/xxx/xxx/Pods/AliyunVideoSDKPro/AliyunVideoSDKPro.framework/AliyunVideoSDKPro(pngtest.o)
ld: 1 duplicate symbol for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

搞了半天才发现是building->other linker flag-> -all_load的问题。
-all_load会导致编译器认为上边两个地方都定义了_main。

故删掉 set building->other linker flag-> -all_load即可。

©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容