我在使用 MobileVLCKit 和 cocoapods 构建我的项目时遇到了一些困难。 在不添加任何 VLCKit 代码的情况下,我在模拟器或设备上构建应用程序时遇到错误。
Pod 文件:
platform :ios, '8.0'
target 'VLCKitTest' do
pod 'MobileVLCKit'
end
这是我得到的错误
Undefined symbols for architecture arm64:
"std::runtime_error::runtime_error(std::string const&)", referenced from:
libebml::CRTError::CRTError(std::string const&, int) in MobileVLCKit(StdIOCallback.o)
"std::ostream& std::ostream::_M_insert<void const*>(void const*)", referenced from:
libebml::IOCallback::writeFully(void const*, unsigned long) in MobileVLCKit(IOCallback.o)
libebml::IOCallback::readFully(void*, unsigned long) in MobileVLCKit(IOCallback.o)
[...]
我的部署目标是 8.0。 我已在调试中将“仅构建事件架构”设置为"is"。
非常感谢您的帮助!
最佳答案
除了按照 Mukesh Thawani 所说的去做;
Change C++ Standard Library to libstdc++ in the Build Settings.
我还需要在 Build Phases -> Link Binary With Libraries 中添加 libstdc++.6.tbd 二进制文件。
这适用于 iOS 9.0。
关于swift - iOS8/Swift 和 MobileVLCKit 构建失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32136478/