Device : macOS Monterey 12.7.6,Xcode 14.2,IOS 16.0.2; I tried adding -ld_classic or -ld64 to the other link flags,but it did not work for me。 How should I fix this?
Xcode14.2:Library not found for -ld64
Xcode 15 introduced the newer linker, and thus the option to use the prior linker with the -ld_classic flag. Since you're on Xcode 14, those options aren't applicable. Beyond that, can you be more specific about what you're trying to solve? Tips on writing forums posts can help you provide all of the useful detail so we understand what you're looking to solve.
— Ed Ford, DTS Engineer
I'm running my app and I've encountered a build issue when running it on a real iOS device.
ld: library not found for -ld64
clang: error: linker command failed with exit code 1 (use
-V to see invocation)
Environment:
macOS Monterey 12.7.6,Xcode 14.2,IOS 16.0.2(
Real machine)
What I Have Tried:
-
Cleaning the build folder in Xcode and rebuilding. Updating and reinstalling all project dependencies.
-
Build Settings -> uild Active Architecture Only -> Yes
-
Build Settings Excluded Architectures -> armv7&armv7s
-
Build Settings -> Other Linker Flags -> -ld64
I'm not sure what other information I can provide that is useful.
Why has your project been configured to use the -ld64 option? Most projects don't need extra linker flags. If that option is removed from your build settings, what happens then?
—Ed Ford, DTS Engineer