【发布时间】:2014-03-15 16:21:58
【问题描述】:
编译器在编译我的代码时出现了几个错误。 错误:
Error 1 error C2039: 'AtlThrowImpl' : is not a member of 'ATL' e:\program files\microsoft visual studio 9.0\vc\include\atlalloc.h 184
Error 7 error C2039: 'AtlThrowImpl' : is not a member of 'ATL' e:\program files\microsoft visual studio 9.0\vc\include\atlalloc.h 184
Error 11 error C2039: 'AtlThrowImpl' : is not a member of 'ATL' e:\program files\microsoft visual studio 9.0\vc\include\atlalloc.h 184
Error 16 error C2039: 'AtlThrowImpl' : is not a member of 'ATL' e:\program files\microsoft visual studio 9.0\vc\include\atlalloc.h 184
Error 22 error C2039: 'AtlThrowImpl' : is not a member of 'ATL' e:\program files\microsoft visual studio 9.0\vc\include\atlalloc.h 184
这是标题的代码部分:
template <typename T>
inline T AtlThrow(T tLeft, T tRight)
{
T tResult;
HRESULT hr=AtlAdd(&tResult, tLeft, tRight);
if(FAILED(hr))
{
AtlThrow(hr);
}
return tResult;
}
我的问题:如何从标题中修复此错误?我需要安装一些 sdk 或关于 ATL 的东西吗?
【问题讨论】:
标签: c++ visual-c++ atl