【问题标题】:Linphone ld: symbol(s) not found for architecture x86_64 - Xcode 10Linphone ld:未找到架构 x86_64 - Xcode 10 的符号
【发布时间】:2019-03-10 14:32:12
【问题描述】:

我最初删除了名为 lstdc++ 的库,因为 Xcode 要求我删除并添加另一个名为 libc++ 的库。

在那之后,又发生了一个错误,然后我已经 2 天无法弄清楚了。

它告诉我什么错误

Undefined symbols for architecture x86_64:
"std::_List_node_base::unhook()", referenced from:
  std::list<Linphone::Conference::Participant, 
std::allocator<Linphone::Conference::Participant> 
>::remove(Linphone::Conference::Participant const&) in 
liblinphone.a(conference.cc.o)
"std::_List_node_base::hook(std::_List_node_base*)", referenced from:
  Linphone::Conference::addParticipant(_LinphoneCall*) in 
 liblinphone.a(conference.cc.o)
 ld: symbol(s) not found for architecture x86_64
 clang: error: linker command failed with exit code 1 (use -v to see 
  invocation)

你们对这个问题有什么想法吗?我一直在寻找另一个网站,它告诉我关注这个libstdc++.6.0.9.tbd,但仍然无法正常工作。

【问题讨论】:

    标签: iphone swift xcode10 linphone


    【解决方案1】:

    我遇到了同样的问题,我可以通过从旧 xcode 复制 lstdc++ 并将构建设置中的 CLANG_CXX_LIBRARY 选项设置为 libstdc++ 来解决它。

    这里你需要复制什么,假设两个 xcode 版本都在 /Applications 并命名为 xcode 10 和 xcode 9:

    cp /Applications/Xcode9.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/lib/libstdc++.* /Applications/Xcode10.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/lib/
    
    cp /Applications/Xcode9.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib/libstdc++.* /Applications/Xcode10.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib/
    
    cp /Applications/Xcode9.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libstdc++.* /Applications/Xcode10.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/
    

    不要忘记清除派生数据并重新启动您的 xcode。

    【讨论】:

      【解决方案2】:

      它对我有用 -> 我删除了 libstdc++.6.0.9.tbd -> 清理并删除派生数据 -> 运行 请备份您的代码并尝试一下

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2013-11-18
        • 2020-06-20
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2016-12-09
        • 2018-02-20
        • 1970-01-01
        相关资源
        最近更新 更多