Xcode 10 GM libstdc++ error, can't run on simulator

和自甴很熟 提交于 2020-01-02 02:32:46

问题


I am trying to test my apps for iOS 12. I have a iPad only app that works fine under Xcode 9. When I try to compile it for the simulator with Xcode 10 GM, the following warning appears:

URGENT: building for iOS Simulator simulator, but linking against dylib (/usr/lib/libstdc++.6.0.9.dylib) built for macOS. Note: This will be an error in the future

It will build, but when running it crashes with the following message:

dyld: lazy symbol binding failed: can't resolve symbol ___cxa_guard_acquire in /Users/.... /.... xxx.app because dependent dylib #1 could not be loaded.

I haven't done anything, it happened on the first try.

Any ideas?


回答1:


removed '/usr/lib/libstdc++.6.0.9.dylib' from the 'OTHER_LDFLAGS', seems to be fine again.




回答2:


libstc is removed in iOS 12 and was first deprecated in Xcode 10. You can however manually add this library in Simulator or update your dependency to use libc++.

Refer this link for manually adding these libraries - libstdc



来源:https://stackoverflow.com/questions/52333547/xcode-10-gm-libstdc-error-cant-run-on-simulator

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!