Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 842
martin010 Avatar asked Sep 14 '18 13:09

martin010


2 Answers

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

like image 192
martin010 Avatar answered Nov 20 '22 02:11

martin010


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

like image 22
Fenil Avatar answered Nov 20 '22 03:11

Fenil