folly
folly copied to clipboard
Errors compiling FBString.h on Windows
Hello,
I apologise if I am doing something silly here - but I cannot work out what's going on.
On Windows (on both MSVC 19 & 22) I am able to install the latest version of Folly using VCPKG (vcpkg.exe install folly:x64-windows --head
), and thus it does compile, but I am unable to later compile FBString.h
when building my code (which depends on Folly). The same setup works fine using GCC.
I see the following errors:
Severity Code Description Project File Line Suppression State
Error C2752 'fmt::v5::formatter<fmt::v5::string_view,char,void>': more than one partial specialization matches the template argument list <path to vcpkg root>\FBString.h 2751
Severity Code Description Project File Line Suppression State
Error C2504 'fmt::v5::formatter<fmt::v5::string_view,char,void>': base class undefined <path to vcpkg root>\FBString.h 2751
Severity Code Description Project File Line Suppression State
Error C2027 use of undefined type 'fmt::v5::formatter<fmt::v5::string_view,char,void>' <path to vcpkg root>\FBString.h 2752
Severity Code Description Project File Line Suppression State
Error C2873 'parse': symbol cannot be used in a using-declaration <path to vcpkg root>\FBString.h 2752
Any pointers as to what's going on here would be appreciated. From what I understand, the entirely of Folly should now be compatible with MSVC 17+.
Thanks for any help!
I'm not able to reproduce this locally with Visual Studio 2022.2. The version of fmt you're building against is quite old (the last patch for fmt v5 was in 2018, current version is 8), does updating that help at all? If not, then I'll need to know a more precise version of MSVC to test with, along with a source example that triggers this, as most of Folly is templated, so won't trigger the error until you actually try to use it.
No current plans to support back to fmt v5.