tryToRunThisCommand
tryToRunThisCommand

Reputation: 161

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?

Upvotes: 0

Views: 922

Answers (2)

tryToRunThisCommand
tryToRunThisCommand

Reputation: 161

I change toolchain from MinGw to Visual Studio and now all works fine.

Upvotes: 0

eerorika
eerorika

Reputation: 238411

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

Upvotes: 2

Related Questions