8

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?

halfer
  • 19,824
  • 17
  • 99
  • 186
martin010
  • 407
  • 1
  • 5
  • 14
  • 1
    You can find the solution from the following [link.](https://stackoverflow.com/questions/50694822/xcode-10-ios-12-does-not-contain-libstdc6-0-9) – Dogan Altinbas Sep 14 '18 at 16:00
  • Thanks, I found out the linker flag's included the '/usr/lib/libstdc++.6.0.9.dylib' which was not needed apparently. I removed this from the OTHER_LDFLAGS and now it seems to be fine again.. – martin010 Sep 15 '18 at 16:28
  • Great :) Please upvote the comment if you've got helped. – Dogan Altinbas Sep 17 '18 at 05:47

2 Answers2

6

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

martin010
  • 407
  • 1
  • 5
  • 14
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

Cœur
  • 37,241
  • 25
  • 195
  • 267
Fenil
  • 1,194
  • 10
  • 11
  • "_Building with libstdc++ was deprecated with Xcode 8 and is not supported in Xcode 10 when targeting iOS_". https://stackoverflow.com/questions/50694822/xcode-10-ios-12-does-not-contain-libstdc6-0-9 – Cœur Nov 01 '19 at 17:15