I having problem with filesystems
library. I have seen many solutions from SO and multiple other forums, but none of them works for me. (I will add list most of them bellow)
System specs:
WSL - Ubuntu 18.04 on Windows 10 build 19041
G++:
g++-8 (Ubuntu 8.4.0-1ubuntu1~18.04) 8.4.0
Linker error: the message is prety chaotic so I will show just the important parts of error message and the complete error message will be bellow.
undefined reference `std::experimental::filesystem::v1::file_size(...)
undefined reference to `std::experimental::filesystem::v1::__cxx11::path::_M_split_cmpts()
From what I see the header file is here, but the source file with definitons is not included.
I have tried:
- Adding
-lstdc++fs
along with-std=c++17
- Using both
#include <filesystems>
and#include <experimental/filesystems>
- in first case it doesn't even see the header file of the lib. I even tried some other-std=...
flags that I can't name right now.
The complete error: https://pastebin.com/HuePgrMw