MinGW-w64 8.1.0 rev 0 doesn't compile when including <filesystem>
This problem could be due to the gcc distribution (mingw-w64) or to the compiler itself (gcc).
As first, more likely hypothesis I think it could be an issue of the distribution, so I have just added it as a bug to the sourceforge website of mingw-w64.
https://sourceforge.net/p/mingw-w64/bugs/737/
If they find that's a problem of gcc, this could be readdressed to the compiler website (gcc.gnu.org).
Let's wait and see what they answer on sourceforge.
Marco
This is a problem between c++17 and file system, perhaps this link will help. issue regarding MinGW-w64 8.1.0 compile issue
So, I am going to give you the full proof solution for this similar error which also comes when someone tries to use the STL header file which is #include<bits/stdc++.h>
So, this error is occurring because you are currently using the GCC version 8.2.0 which is the default on the MinGW website. To solve this problem you need to update to GCC 10.2.0
Following are the steps you need to follow:- 1.) Download and install the Msys2 from https://www.msys2.org/ 2.) Run or launch this and type pacman -Syu and hit enter then it will ask you to continue by typing Y/N just type enter without pressing Y/n. 3.) Close this and again launch msys2 at least run this command 2-3 times until it shows nothing to do with or nothing to update. 4.) For doing the same I am also sharing a link to the youtube video. https://www.youtube.com/watch?v=aXF4A5UeSeM&
5.) For checking that you have successfully installed GCC 10.2.0 just open cmd and type GCC --version and hit enter if it is showing 10.2.0 hurray u did it, wait this is not the end. 6.) Now uninstall Clion or any IDE which you are using. 7.) Before reinstalling it you need to delete some of the remaining Jetbrains dump files which are showing in your program files folder (name Jetbrains) Delete that folder and Reinstall it. 8.) Now select Msys2/MingW-64, not the previous one which you have in your system already (normal MinGW) while installing it. 9.) Now You can go to your add or remove program section and can delete that waste normal MinGW-64, not the msys2 (don't delete msys2) only delete ming64 the previous one. 10.) Now you can enjoy running that sexy stl library without having any error.
Still, you have any problem doing these steps just ask me in the comment. Thanks, Guys.