1

Using the latest Visual Studio Community Preview (15.6.0 Preview 2), the following code fails to link:

#include <locale>

int main()
{
    std::locale loc;
    auto const& cvt = std::use_facet<std::codecvt<char32_t, char, std::mbstate_t>>(loc);
}

The error is:

error LNK2001: unresolved external symbol "public: static class std::locale::id std::codecvt<char32_t,char,struct _Mbstatet>::id" (?id@?$codecvt@_UDU_Mbstatet@@@std@@2V0locale@2@A)

I've heard that this may be due to Visual C++ bug. Can anyone suggest a workaround?

Alex O
  • 1,429
  • 2
  • 13
  • 20
  • There's a few here https://stackoverflow.com/questions/32055357/visual-studio-c-2015-stdcodecvt-with-char16-t-or-char32-t – john Feb 04 '18 at 21:07

0 Answers0