https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68631
--- Comment #9 from Hubert Jarosz <marqin.pl+gcc at gmail dot com> --- Oh, wait, now it works. So it's a bug when -lstdc++fs is not at the end. On my normal g++/clang++ puting -l flags on the end works well, except for this one on 5.3.