Why std::filesystem is not supported On Mac qt6.2
-
QFile has a public function
std::filesystem::path filesystemFileName() const
but it doesn't work on Mac, because#define QT_FEATURE_cxx17_filesystem
is set to-1
in qtcore-config.h. Why is this?for the longest time, clang only supported C++17 language features but not C++17 standard library features, with std::filesystem being a library feature.
I think, you'll need at least clang 9 or 10.
So what are you using, what was used for the qt libs to compile ? thats where the config.h comes from (I think)
-
for the longest time, clang only supported C++17 language features but not C++17 standard library features, with std::filesystem being a library feature.
I think, you'll need at least clang 9 or 10.
So what are you using, what was used for the qt libs to compile ? thats where the config.h comes from (I think)
-
@J-Hilk I'm using
Apple clang version 13.1.6 (clang-1316.0.21.2.3)
andQt 6.2.4 macos
. std::filesystem is available as long as I setCMAKE_CXX_STANDARD
to 17 or later -
Hi,
Did you build Qt yourself ?
If not, how did you install it ?