gulrak / filesystem

An implementation of C++17 std::filesystem for C++11 /C++14/C++17/C++20 on Windows, macOS, Linux and FreeBSD.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mingw missing `preferred_separator`

glebm opened this issue · comments

Thank you for this library!

When using it with mingw, preferred_separator does not get defined:

undefined reference to `ghc::filesystem::path::preferred_separator'

https://ci.appveyor.com/project/sass/libsass/builds/26929504/job/jl88r6p7ci6bq9ad

This is with filesystem.hpp from master, mingw x86_64-4.9.2-release-win32-seh-rt_v4-rev3

Yeah, sadly there was no test checking if the preferred_seperator works. I added one and compiling it fails with linker errors. I startet experimenting with a workaround. Still didn't check on mingw 4.9.2 but I also have some trouble with Visual Studio 2015 and the workaround.
GCC 4.9 also has some other issues concerning constexpr, so I might integrate a fall-back to const for pre 5.0 GCC. That needs to be checked.

Just wanted to add, that I'm sorry, I need a few days for the fix, as I'm currently ill. Hopefully I'll get to it during the upcomming weekend. I started on it during last weekend on feature-27-mingw-preferred_separator, but as I said, MSVC 19.0 (Visual Studio 2015) has some problems left, and I didn't feel well enough to dig deeper.

Get better soon!

Turns out I didn't even need preferred_separator, I just hadn't been aware that generic_u8string() exists.

Released with v1.2.6

Thanks!