我最初删除了名为 lstdc++
的库,因为 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/