Search code examples
c++c++17clion

How to fix MinGW filesystem probelem?


So I create a new C++17 Clion project, and include filesystem library. When I try to run porject I have this error:

fatal error: filesystem: No such file or directory

I try to use: #include <experimental/filesystem>, with it namespace, but it doesn't work.

I use MinGW-w64 v. 6.0.

How Can I fix it?


Solution

  • fatal error: filesystem: No such file or directory

    This message is issued by your compiler. The IDE merely relays the message to you.

    To solve it, you must use a toolchain that supports C++17. In particular, you need a standard library that supports <filesystem>. This issue track suggests that it is implemented in trunk (but not enabled by default), and will be released in GCC version 9 (I don't know how that relates to MinGW version number).