Reply to Weird linker error: "building for macOS-x86_64 but attempting to link with file built for macOS-x86_64" I had the same nonsensical error message as the original post, and this answer fixed it immediately. Developer Tools & Services Xcode Oct ’22