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?
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.