gpt4 book ai didi

c++ - VLCKit 与 iOS 项目中的 .mm 文件冲突

转载 作者:塔克拉玛干 更新时间:2023-11-02 09:26:52 25 4
gpt4 key购买 nike

我在我的 iOS 项目中使用 VLCKit (MobileVLCKit.framework)。起初一切正常。然后我添加一些 C++ 代码,所以一些文件是 .mm 文件。当我编译时,它失败了。 Xcode 日志

Undefined symbols for architecture armv7:
"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)
"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)
"VTT for std::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >", referenced from:
...

我不知道为什么以及如何解决这个问题。

最佳答案

我找到了解决方案:在build设置中将 C++ 标准库更改为 libstdc++(GNU c++ 标准库)。

关于c++ - VLCKit 与 iOS 项目中的 .mm 文件冲突,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27559440/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com