第三方库在 Undefined symbols for architecture x86_64 部分中创建 78 链接器错误

Third part library create 78 linker error in an Undefined symbols for architecture x86_64 section

我已经用 cocoaPods 安装了一个库(我第一次使用 cocoaPod) 因为我在 "Undefined symbols for architecture x86_64" 部分中有很多错误。 libPods.a 在我的项目和 pods 产品组中是红色的,Foundation.framework 在 pods 中是红色的。 我尝试重新安装它,清除项目(也包括 derivedData),从链接库中删除 libPod.a 和其他问题,问题仍然存在。 我的 PodFile 是:

平台:ios, '8.0' 吊舱 'MobileVLCKit'

错误在架构的未定义符号部分x86_64: 除了最后五个错误之外的所有错误都是这样开始的: “标准:: (我要举个例子:"std::basic_string, std::allocator >::find(wchar_t const*, unsigned long, unsigned long) const",引用自: TagLib::String::find(TagLib::String const&, int) MobileVLCKit 中的常量(tstring.cpp.o) TagLib::String::split(TagLib::String const&) MobileVLCKit 中的常量(tstring.cpp.o))

他们三人之后就这样开始了

"std:: 的 VTT (

"VTT for std::basic_stringstream, std::allocator >",引用自: dash::mpd::Segment::toChunk() 在 MobileVLCKit(libdash_plugin_la-Segment.o )

dash::http::PersistentConnection::prepareRequest(dash::http::Chunk*) 在 MobileVLCKit(libdash_plugin_la-PersistentConnection.o) libebml::IOCallback::writeFully(void const*, unsigned long) 在 MobileVLCKit(IOCallback.o) libebml::IOCallback::readFully(void*, unsigned long) 在 MobileVLCKit(IOCallback.o) libebml::MemIOCallback::MemIOCallback(unsigned long long) 在 MobileVLCKit(MemIOCallback.o) libebml::StdIOCallback::StdIOCallback(char const*, open_mode) 在 MobileVLCKit(StdIOCallback.o) libebml::StdIOCallback::close() 在 MobileVLCKit(StdIOCallback.o) ...

)

还有两个这样的

"std::basic_

的 vtable

(

dash::mpd::BasicCMParser::parseCommonAttributesElements(dash::xml::Node*, dash::mpd::CommonAttributesElements*, dash::mpd::CommonAttributesElements*) const in MobileVLCKit(libdash_plugin_la-BasicCMParser.o)

dash::mpd::BasicCMParser::handleDependencyId(dash::mpd::Representation*, dash::mpd::AdaptationSet const*, std::string const&) 在 MobileVLCKit(libdash_plugin_la-BasicCMParser.o) dash::mpd::BasicCMParser::resolveUrlTemplates(std::string&, bool&) 在 MobileVLCKit(libdash_plugin_la-BasicCMParser.o) dash::mpd::SegmentTemplate::getSourceUrl() MobileVLCKit 中的常量(libdash_plugin_la-SegmentTemplate.o) dash::mpd::Segment::toChunk() 在 MobileVLCKit(libdash_plugin_la-Segment.o)

  dash::http::PersistentConnection::prepareRequest(dash::http::Chunk*) in MobileVLCKit(libdash_plugin_la-PersistentConnection.o)
  libebml::IOCallback::writeFully(void const*, unsigned long) in MobileVLCKit(IOCallback.o)
  ...

)

有一个注意事项:注意:缺少 vtable 通常意味着第一个非内联虚拟成员函数没有定义。

并在本节末尾:

ld:未找到体系结构的符号 x86_64 clang:错误:链接器命令失败,退出代码为 1(使用 -v 查看调用)

在警告消息的最后,我收到一个 activity 日志,其中包含 80 个错误 :?

感谢阅读

PS : 找不到.m文件 希望是正常的 PS: 是的,我在 Cocoa 创建的工作区中打开我的项目pods

可能与 CocoaPods 文件有关,但看起来您的项目在依赖项中没有 libstdc++。我在规范中看到它:

xcconfig": {
    "CLANG_CXX_LANGUAGE_STANDARD": "c++11",
    "CLANG_CXX_LIBRARY": "libstdc++"
}

C++ 代码需要它。