通过 pod 安装 MobileVLCKit 在我的 swift 项目中出现链接器错误。
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_VLCMediaPlayer", referenced from:
objc-class-ref in StreamingController.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
我做了以下步骤
在 Build-Phases -> Link Binaries -> libstdc++.6.tbd 中安装 Vlckit 后解决构建项目的错误
在上一步 BuildSettings ->'EnableBitcode = No' 之后解决 apple-linker 错误
在 Bridging-Header 文件中,执行
#import <MobileVLCKit/MobileVLCKit.h>
在“BuildSettings -> other_linker_flags”中,这个 MobileVLCKit 框架也没有显示,虽然我可以在“Pods”文件夹中看到“MobileVLCKit”文件夹
编辑
通过执行以下步骤,我能够删除此错误并找到“MobileVLCKit”:
- 在 Build_Settings -> Other_Linker_Flags 中,添加:-framework "MobileVLCKit"
- 在 Build_Settings -> Other_Linker_Flags 中,添加:-l"bz2"
- 在 Build_Settings -> Other_Linker_Flags 中,添加:-l"iconv"
但随后这些修复从 AVSLibrary 框架中使用的其他框架“libavsobjc.stripped.a”生成了其他链接器错误,该框架在应用程序中用于其他目的。
我希望 Vlc 和 AVSLibrary 应该共存。有任何想法吗 ?