Link error when using std::codecvt_utf8_utf16<char16_t> - by Paul Walmsley (work)

Status : 

  Fixed<br /><br />
		This item has been fixed in the current or upcoming version of this product.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.


17
0
Sign in
to vote
ID 1348277 Comments
Status Closed Workarounds
Type Bug Repros 7
Opened 5/19/2015 1:33:16 PM
Access Restriction Public

Description

I've attached two repro cases -- comment out the #define to switch between them.  The first case is taken from http://en.cppreference.com/w/cpp/locale/codecvt_utf8_utf16 but with wchar_t -> char16_t .  This code linked fine in VS2013 update 4 and also in Xcode 6.x (with clang).  

Link error is:
  unresolved external symbol "__declspec(dllimport) public: static class std::locale::id std::codecvt<char16_t,char,struct _Mbstatet>::id" 
Sign in to post a comment.
Posted by asn_t on 3/7/2017 at 11:09 AM
Link error when using std::codecvt_utf8_utf16<char16_t>
This issue is still in VS 2017 Community which I installed this morning (3/7/2017)

std::string utf8 = u8"z\u00df\u6c34\U0001d10b";
std::u16string utf16 = std::wstring_convert<std::codecvt_utf8_utf16<char16_t>, char16_t>{}.from_bytes(utf8.data());
Posted by DJLeach on 12/9/2016 at 11:14 AM
This bug is still present in Visual Studio Professional 2017 RC (Version 15.0.25928.0 D15REL)
Posted by Microsoft on 2/2/2016 at 12:30 PM
Hello,

Thanks for reporting this bug!

I have fixed this issue, and the fix will be available in the next major version of Visual Studio.

Steve Wishnousky
Software Engineer II - Visual C++ Libraries
stwish@microsoft.com
Posted by Microsoft on 5/19/2015 at 2:05 PM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If you require immediate assistance with this issue, please contact product support at http://support.microsoft.com/ph/1117.