0

I just updated my Xcode to version 10. And when i build my project it shows me error

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

I have been trying to clean project for many times but still not work for me.

Anyone has solution for this?

Visal Sambo
  • 1,270
  • 1
  • 19
  • 33
  • Possible duplicate of [Xcode 10 beta error: linker command failed with exit code 1](https://stackoverflow.com/questions/51367990/xcode-10-beta-error-linker-command-failed-with-exit-code-1) – Kerberos Oct 02 '18 at 14:50

2 Answers2

2

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

JTea
  • 234
  • 2
  • 5
0

Try to clear the derived data, paste this into your termnial:

rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang/ModuleCache"
rm -rf ~/Library/Developer/Xcode/DerivedData
rm -rf ~/Library/Caches/com.apple.dt.Xcode
Elhoej
  • 741
  • 7
  • 29