问题
This is the complete error:
ld: library not found for -lstdc++.6 clang: error: linker command failed with exit code 1 (use -v to see invocation)
I have no idea what is this about, I'm using Xcode 10 beta, and iOS 11.4.1, I have no "pods" project or anything like that, when I try to run the command:
pod install
I get the command not found.
I'm not using any additional tools or anything, so I'm only using npm and xcode command line commands.
Thanks.
回答1:
(I post the solution here for all those who googled "cocoapods lstdc xcode 10" since this is the first page that hits.)
If you are using cocoa pods and got a similar error then the solution is to delete -l"stdc++.6"
from your xcconfig files. Now build and run. Xcode10 build should succeed now :)
Cocoa pods is for some reason adding stdc so it gets linked, but that is not be needed and Xcode10 does not have that library anymore.
回答2:
Libstdc++ was deprecated, the support was removed from the iOS 12 simulator (not for device).
One of the library in the pod file have a dependency builded with libstdc++, you can try to find a more recent version builded with the libc++.
来源:https://stackoverflow.com/questions/51367990/xcode-10-beta-error-linker-command-failed-with-exit-code-1