4 ms·
> Then what is the lowest macOS version the binary can support??? It's very tricky [...] No it's not. The oldest supported version of macOS your binary will ru
by jcelerier 5y ago
> Then what is the lowest macOS version the binary can support??? It's very tricky [...]
No it's not. The oldest supported version of macOS your binary will run on will be the one you set in your CFLAGS with the -mmacosx-version-min=10.x flag when you build.
The OS you are running the build on and the Xcode version don't influence that, you should just run the most recent Xcode you can, build against the most recent macOS SDK available and set that flag. You can target 10.8 from Big Sur and Xcode 12 with afaik no issues.
- snnn 5y ago> The OS you are running the build on and the Xcode version don't influence that Usually it doesn't. But in this special case it does. I have set the flag you said. When C++17 wasn't in the picture, it's enough. But now we are talking about how to enable developer using the new language features. New C++ features typically need new runtime. But the old systems do have it. Then one of the difficulty is how to figure out which macOS versions have it, which doesn't.
- jcelerier 5y agoThe std::optional / std::variant case is unfortunate indeed, it's sadly an argument for using non-std versions of these types. It's also possible to cheat a bit with libc++ macros.. -D_LIBCPP_NO_EXCEPTIONS=1 does the trick (but turns exceptions into asserts). You can also link statically against libc++.