If a project that built with Xcode 26 starts failing with library 'd64' not found after upgrading to Xcode 27, the project or its generator is probably still passing the obsolete -ld64 linker-selection option. Xcode 27 removed the old ld64 implementation, and Apple Developer Technical Support recommends removing -ld64 from OTHER_LDFLAGS.
Representative error
ld: library 'd64' not found
clang: error: linker command failed with exit code 1 (use -v to see invocation)
The same project may build successfully with Xcode 26 but fail at the link stage for a device or Simulator target when built with Xcode 27.
Cause
When -ld64 is placed directly in the OTHER_LDFLAGS build setting, Clang’s compiler driver sees it first. To the driver, -lNAME means “link a library named NAME,” so it parses -ld64 as a request for a library named d64. Because no such libd64 exists, the linker reports library 'd64' not found.
Passing the option directly to the linker with -Xlinker -ld64 is not a solution in Xcode 27. Apple explains that Xcode 27 removed the legacy ld64 implementation and always uses the newer ld_prime implementation.
Affected conditions and versions
- The project is built with Xcode 27.
-ld64remains inOTHER_LDFLAGS, an.xcconfigfile, a build script, or a project generator.- Projects that still select the legacy linker with
-ld_classicare also incompatible because Xcode 27 no longer supports that option.
Fix status:This is an intentional Xcode 27 compatibility change, not a version-specific bug awaiting a patch. Projects must remove the obsolete linker-selection flags to build with Xcode 27 and later.
Recommended fix
1. Inspect Other Linker Flags
Select the target in Xcode, open Build Settings, and search for Other Linker Flags or OTHER_LDFLAGS. Check both project-level and target-level settings, and inspect Debug and Release configurations.
2. Remove -ld64
Before:
OTHER_LDFLAGS = $(inherited) -ld64
After:
OTHER_LDFLAGS = $(inherited)
Apple DTS specifically recommends removing the option. Do not replace it with a differently escaped form for Xcode 27.
3. Remove legacy -ld_classic selections
The Xcode 27 release notes state that both the old ld64 linker implementation and the -ld_classic option have been removed. Delete forms such as:
-ld_classic
-Wl,-ld_classic
-Xlinker -ld_classic
4. Search xcconfig files and project generators
If the flag is not visible in the target’s Build Settings, search the project and its generator configuration:
rg -n --hidden --glob '!DerivedData/**' -- '-ld64|-ld_classic' .
If CocoaPods, a custom script, a game engine, or another tool regenerates the Xcode project, fix or update the generator rather than editing only the generated .pbxproj.
5. Clean and rebuild
Choose Product > Clean Build Folder, then rebuild. Confirm that the link invocation no longer contains -ld64.
How to verify the fix
Use xcodebuild to inspect the expanded build settings:
xcodebuild -project MyApp.xcodeproj \
-scheme MyApp \
-showBuildSettings | grep -E 'OTHER_LDFLAGS|OTHER_LDPLUSPLUSFLAGS'
The output should contain neither -ld64 nor -ld_classic. Rebuild the app and run an Archive build as well, because stale flags may exist only in the Release configuration. The fix is confirmed when the link step succeeds and library 'd64' not found no longer appears.
Alternatives
- Update the build tool or game engine that injects the legacy flag to a version that supports Xcode 27.
- As a temporary measure, strip the flag after project generation. This is fragile because regeneration can restore it.
- Continue using Xcode 26 briefly while migrating, but plan to remove the flag because newer SDK and submission requirements will eventually require a newer Xcode.
Important cautions
- Do not search for or add a
libd64.aorlibd64.dylib. A required application library is not actually missing. - Changing the option to
-Xlinker -ld64does not solve the Xcode 27 case because the linker no longer supports that selection. - If removing the flag exposes undefined symbols or other link failures, investigate those separately; the legacy linker may have hidden another compatibility issue.
- Check app, framework, test, CocoaPods, and generated targets independently for inherited flags.
Summary
In Xcode 27, library 'd64' not found usually means that an obsolete -ld64 option was interpreted as a request to link a library named d64. Xcode 27 also removed the old ld64 implementation, so the correct migration is to remove -ld64 and -ld_classic from build settings and generators, then build with Xcode 27’s default ld_prime linker.
