what's with the C++ <filesystem> extension?

René J.V. Bertin rjvbertin at gmail.com
Sun Sep 18 12:29:07 UTC 2022


Hi,

Building C++ code that does

#include <filesystem>

I get either a file-not-found error or a bunch of errors that the functions are 10.15+ only. What's with that?

If the implementation is provided by libc++, isn't this something that could be patched? Shouldn't require any external dependencies on systems that already underwent the libc++ conversion.

On more recent systems that have a stock libc++ one can install `port:libcxx` with the binaries under $prefix . I have been doing that for years so all MacPorts executables use it, and that has never caused any ABI issues with system libraries that were built against the stock libc++ version.
In fact, I often use my own build for other applications as well, assuming they'll benefit from newer=better and the maximum optimisation I used in the build.

R.


More information about the macports-dev mailing list