当我按照MSDN 文档在 Visual Studio 2005 中使用 CA2W 将 big5 字符串转换为 unicode 字符串时遇到了一个奇怪的编译错误。
这是我写的代码:
#include <string>
#include <atldef.h>
#include <atlconv.h>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
string chineseInBig5 = "\xA4\xA4\xA4\xE5";
ATL::CA2W(chineseInBig5.c_str());
return 0;
}
编译错误:error C3861: 'AtlThrowLastWin32': identifier not found
我不知道这怎么会发生。AtlThrowLastWin32的文档显示需要atldef.h,但是在atldef.h中找不到AtlThrowLastWin32的声明。