For a new project i need use filesystem library but when I try to include it, my compilation fail cause it can't find the library. I'm compiling on Windows with gcc installed via minGW and his version should be 6.3. I know for sure that from gcc 8+ this library should be included in the standard one. I' ve also tried to find it in experimental but it can't do it. Is there any way to solve this problem? Like installing a newer version of gcc or including this library in any other way? Sorry but I'm not used to this type of thing.
Asked
Active
Viewed 597 times
0
-
Install mingw using msys2: [https://stackoverflow.com/questions/30069830/how-to-install-mingw-w64-and-msys2](https://stackoverflow.com/questions/30069830/how-to-install-mingw-w64-and-msys2) you will have a mingw with gcc 11.2.0 – drescherjm Apr 22 '22 at 15:24
-
For the easiest time of getting minGW installed, it should be done using MSYS2. – sweenish Apr 22 '22 at 15:24
1 Answers
0
The C++ filesystem
library was introduced in C++17, but your compiler might be configured to use an earlier version of the language by default. Try using the -std=c++17
option.

David Grayson
- 84,103
- 24
- 152
- 189
-
thanks for the answer, but MinGW uses gcc 6.3, which supports only C++14. Anyway thanks for the time. – Gabriele Passoni Apr 25 '22 at 15:49
-
MSYS2 has packages for MinGW-w64 GCC and they are much more up-to-date than that. More installation options here: https://www.mingw-w64.org/downloads/ – David Grayson Apr 25 '22 at 15:59