我正在尝试在 和 之间进行utf8
转换ucs2
。
#include <codecvt>
std::wstring_convert<std::codecvt_utf8<char16_t>, char16_t> ucs2conv;
std::u16string ucs2 = ucs2conv.from_bytes(utf8_string);
std::string utf8_new = ucs2conv.to_bytes(ucs2);
不幸microsoft vs2015
的是,使用codecvt
. 导致以下错误:
错误 LNK2001 无法解析的外部符号“__declspec(dllimport) public: static class std::locale::id std::codecvt::id”
有谁知道如何以一种可行的方式解决这个错误linux
?