Did you set your deployment target to encompass those older systems?
In general, Xcode tries to ensure that, if you set your deployment target correctly, things will either work or you’ll get build-time complaints about the fact that your code is relying on functionality that’s not available on those systems.
Normally in Linux
A lot of things work differently on Apple platforms (-: I have a post that explains a bunch of this: An Apple Library Primer. In terms of C++ runtime libraries, third-party program have two options:
-
Use the system C++ runtime libraries and write code that’s compatible with the program’s minimum deployment target.
-
Use their own C++ runtime libraries, and then bundle that with the program.
Notably, you can’t bundle the system’s C++ runtime libraries with your code. In fact, these libraries don’t even exist on disk any more because they’re glommed into the dynamic linker shared cache:
% ls -l /usr/lib/libc++.1.dylib
ls: /usr/lib/libc++.1.dylib: No such file or directory
% dyld_info -platform /usr/lib/libc++.1.dylib
/usr/lib/libc++.1.dylib [arm64e]:
-platform:
platform minOS sdk
macOS 14.4 14.4
MacCatalyst 17.4 17.4
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"