I'm getting an STL-related link error, using Microsoft Visual Studio Community 2015 RC (Version 14.0.22823.1 D14REL)
I'm linking a C++ DLL and successfully using many functions from the STL, but it can't find stuff related to std::codecvt:
error LNK2001: unresolved external symbol "__declspec(dllimport) public: static class std::locale::id std::codecvt<char32_t,char,struct _Mbstatet>::id" (__imp_?id@?$codecvt@_UDU_Mbstatet@@@std@@2V0locale@2@A)
The source code reference causing this issue:
std::wstring_convert< std::codecvt_utf8<char32_t>, char32_t > convert;
My code generation is for multithread dll, and I have verified through verbose linking that MSVCPRT.lib is being searched at link time.
Any ideas ?
To clarify the issue and the solution: Microsoft acknowledged that std::codecvt
is not built against the char32_t
in std library provided with Microsoft Visual Studio 2015 RC. The workaround is to use the unsigned int
or the __int32
types:
std::wstring_convert< std::codecvt_utf8<unsigned int>, unsigned int > convert;
or
std::wstring_convert< std::codecvt_utf8<__int32>, __int32 > convert;
instead of
std::wstring_convert< std::codecvt_utf8<char32_t>, char32_t > convert;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With