Getting error : ld: library not found for -lstdc++


Recently I have updated forge platform_version to 2.7.6 . Also I have updated all the modules to the latest version. But when I am trying to package then getting following error :

ld: library not found for -lstdc++
clang: error: linker command failed with exit code 1 (use -v to see invocation)


The following build commands failed:
Ld /var/folders/yk/1m64_9kd7g9bd8f08nnm63sh0000b3/T/tmpz3JspF/ios/app/build/ normal x86_64
Ld /var/folders/yk/1m64_9kd7g9bd8f08nnm63sh0000b3/T/tmpz3JspF/ios/app/build/ normal i386
(2 failures)

[ INFO] 2019-05-16 11:35:55,224 – cleaning up source directories
[ ERROR] 2019-05-16 11:35:55,225 – Xcode error

Please suggest the workaround for this.


libstdc++ has been deprecated for some time and Apple finally removed it with the release of Xcode 10.

If you need a C++ standard library you’ll have to switch to libc++:


  • 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)