【问题标题】:MobileVLCKit for iOS fails to build (Both pod and Framework)适用于 iOS 的 MobileVLCKit 无法构建(pod 和框架)
【发布时间】:2015-09-09 16:24:17
【问题描述】:

在构建包含 MobileVLCKit 的项目时,构建失败并出现来自“Undefined symbols for architecture arm64:”的 76-100 错误

例如前几个:

"std::runtime_error::runtime_error(std::string const&)", referenced from:
      libebml::CRTError::CRTError(std::string const&, int) in MobileVLCKit(StdIOCallback.o)
  "std::runtime_error::runtime_error(std::string const&)", referenced from:
      libebml::IOCallback::writeFully(void const*, unsigned long) in MobileVLCKit(IOCallback.o)
      libebml::IOCallback::readFully(void*, unsigned long) in MobileVLCKit(IOCallback.o)
  "std::basic_ios<char, std::char_traits<char> >::widen(char) const", referenced from:
      dash::mpd::Representation::contextualize(unsigned long, std::string const&, adaptative::playlist::BaseSegmentTemplate const*) const in MobileVLCKit(libdash_plugin_la-Representation.o)

这发生在 cocoapod 和从这里下载的框架中:http://nightlies.videolan.org/build/ios/

此错误不会在此处的示例项目中复制: http://feepk.net/2014/12/02/mobilevlckit-and-vlckit-part-1/

我检查了所有链接库和链接器标志,一切似乎都井井有条。想法?

【问题讨论】:

    标签: ios cocoapods vlc undefined-symbol


    【解决方案1】:

    我通过将 libstdc++.dylib 替换为 libstdc++.6.0.9.dylib 解决了这个问题。部署目标可以通过这种方式设置为想要的版本。 (Reference Link: Chinese blog)

    【讨论】:

      【解决方案2】:

      我在查看 so cmets 的帖子后发现了问题——部署目标必须设置为 6.1,因为 iOS 6.1 和 7.0 中使用的 C++ 运行时发生了变化。

      我会留在这里,以防其他人遇到这个问题。

      如果您不想更改部署目标,您还可以添加一个空的 .mm 文件来强制 Xcode 与 C++ 链接(通过 here

      【讨论】:

      • 添加 mm 文件有效...不知道为什么或如何有效。
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-04-06
      • 2014-08-13
      • 1970-01-01
      • 2018-09-05
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多