Xcode 10 (iOS 12) Does Not Contain Libstdc++6.0.9

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

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

library not found for -lstdc++.6.0.9 - Xcode 10

From the Xcode 10 release notes,

Building with libstdc++ was deprecated with Xcode 8 and is not supported in Xcode 10 when targeting iOS. C++ projects must now migrate to libc++ and are recommended to set a deployment target of macOS 10.9 or later, or iOS 7 or later. Besides changing the C++ Standard Library build setting, developers should audit hard-coded linker flags and target dependencies to remove references to libstdc++ (including -lstdc++, -lstdc++.6.0.9, libstdc++.6.0.9.tbd, and libstdc++.6.0.9.dylib). Project dependencies such as static archives that were built against libstdc++ will also need to be rebuilt against libc++. (40885260)

ld: library not found for -lstdc++.6

The quick solution is to copy all libstdc++.* file from old Xcode(9.4) to new Xcode(10.x)

For device :

cp /Applications/Xcode9.4.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/

For Simulator :

cp /Applications/Xcode9.4.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/

library not found for -lstdc++.6 when using IBM Mobile First 8 with Xcode 10

You can remove the dependency in your Xcode project. See https://mobilefirstplatform.ibmcloud.com/blog/2018/07/23/mfp-support-for-ios12/#known-issues for instructions.

libstdc++.6.0.0.tbd or .dylib

When you add the library, rather than hunt though the list, just press "Add Other" then manually navigate to /usr/lib or just press "CMD + Shift + G" then type in "/usr/lib/libstdc++.dylib"

Xcode 10 - Build project failed

Xcode 10 removed support for -lstdc++. So check in your project settings under 'BuildPhases -> Link Binary With Libraries ' and remove the -lstdc++ dependency. If you use a 3rd party library which depends on -lstdc++ then you would need to ask to get a new version without this dependency.
Also check:
Xcode 10 (iOS 12) does not contain libstdc++6.0.9



Related Topics



Leave a reply



Submit