Using Xcode 11.1, building on MacOS 10.14.6 (Mojave), the following lines:
#include <filesystem>
typedef std::filesystem::path my_path;
...generate this compiler error:
'path' is unavailable: introduced in macOS 10.15
Does this mean I can't build for earlier versions of MacOS (10.13, 10.14) FROM 10.14, or that I can't generate an executable from 10.15 that can target/run on versions of MacOS that are EARLIER than 10.15?
The macOS 10.15 SDK provides support for developing apps for Macs running macOS Catalina 10.15. The SDK comes bundled with Xcode 11 available from the Mac App Store.
Start with Clang - Many C++11 features are now available in Clang. It's included with Xcode.
For macOS 10.14. 4, Xcode versions compatible are: Xcode 10.2 - 11.3.
It means that (using Apple's tools/libraries), you cannot use std::filesystem
in a project targeting a version of Mac OS before 10.15.
If you have a new enough Xcode, etc. you should be able to build a project on 10.14 (say) that targets 10.15 and uses filesystem
types and calls. But it won't run on 10.14.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With