2

I got this error:

ld: file too small (length=19) file '/Users/xxx/xxx/xxx/libc++.dylib' for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)`

I have tried clean/build or delete/re-add with not luck.

Similar posts:

pkamb
  • 33,281
  • 23
  • 160
  • 191
Frostless
  • 818
  • 1
  • 11
  • 33
  • have you deleted your derived-data ?? – dahiya_boy Apr 07 '18 at 10:58
  • @dahiya_boy no , is this command rm -rf /Users/hostname/Library/Developer/Xcode/DerivedData? what is the hostname? – Frostless Apr 07 '18 at 11:01
  • you can check from [here](https://stackoverflow.com/questions/38016143/how-to-delete-derived-data-in-xcode-8?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa). Even close your xcode(force quit) and restart it now clen N build.. – dahiya_boy Apr 07 '18 at 11:04
  • unfortunately it turns out that delete derived-data doe not work in my case... – Frostless Apr 07 '18 at 11:30
  • Does this answer your question? [Xcode linker error: file too small for architecture x86\_64](https://stackoverflow.com/questions/14034048/xcode-linker-error-file-too-small-for-architecture-x86-64) – pkamb Nov 20 '20 at 01:10

1 Answers1

2

I solved this on Xcode 12.5.1 by going to "Clean Build Folder" under the Product menu on the top bar.

Tom Wilson
  • 121
  • 5