iphone - Linphone ld : symbol(s) not found for architecture x86_64 - Xcode 10

标签 iphone swift xcode10 linphone

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

在那之后,又发生了另一个错误,然后我已经两天都弄不明白了。

它向我显示错误

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但还是不行。

最佳答案

我有同样的问题,我能够通过从旧 xcode 复制 lstdc++ 并将build设置中的 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。

关于iphone - Linphone ld : symbol(s) not found for architecture x86_64 - Xcode 10,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52659593/

相关文章:

iphone - 弹出时如何从主视图调用函数

swift - 搜索包含 1500 个对象的数组是否合乎逻辑?

ios - 正确使用 Alamofire 的 URLRequestConvertible

ios - Xcode 10 : Storyboard not showing Identity, 属性...检查器

xcode10 - Xcode 10 : Custom Animated Transitions Stuck

iphone - ios找出引发事件的按钮

iphone - 在 NSMutableSet 中查找具有相同属性值的对象

ios - 如何使用 iphone 相机渲染 GLKView Controller

arrays - 基于 array.count 生成 imageView - Swift

ios - CollectionView navigationController?.pushViewController() 什么都不做,没有错误