xcode ld: symbol(s) not found for architecture x86_64

497 阅读1分钟

Xcode 15.3 模拟器运行报错: ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

尝试了网上的很多方法,"Other Linker Flags" 添加 -ld64、"Architectures" 添加 x86_64 架构都不奏效,最后这样解决的:

  • 在 Xcode15.3 中 Product - Destination - Show All Run Destinations 后选择 Rosetta 模拟器
  • 在 Xcode15.2 中 Destination - Destination Architectures

image.png

image.png