首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >为平台设置为x64构建时的atlcom.h生成错误

为平台设置为x64构建时的atlcom.h生成错误
EN

Stack Overflow用户
提问于 2013-01-16 07:21:22
回答 1查看 5.3K关注 0票数 3

我正在将现有的c++项目从32位版本转换为64位版本.这个项目在32位版本中构建得很好,在转换到x64平台的Configuration中,我遇到了构建错误,是否有任何具体的我必须继承的64位版本,或者我遗漏了什么。

无法实例化抽象类C:\Program (x86)\Microsoft 11.0\VC\atlmfc\include\atlcom.h

下面是生成项目时输出的错误。

代码语言:javascript
复制
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\atlmfc\include\atlcom.h(2000): error C2259: 'ATL::CComObject<Base>' : cannot instantiate abstract class
          with
          [
              Base=NAlertBand
          ]
          due to following members:
         'HRESULT IContextMenu::GetCommandString(UINT_PTR,UINT,UINT *,CHAR *,UINT)' : is abstract
          C:\Program Files (x86)\Windows Kits\8.0\Include\um\shobjidl.h(2732) : see declaration of 'IContextMenu::GetCommandString'
          C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\atlmfc\include\atlcom.h(1989) : while compiling class template member function 'HRESULT ATL::CComCreator<T1>::CreateInstance(void *,const IID &,LPVOID *)'
          with
          [
              T1=ATL::CComObject<NAlertBand>
          ]
          C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\atlmfc\include\atlcom.h(2096) : see reference to function template instantiation 'HRESULT ATL::CComCreator<T1>::CreateInstance(void *,const IID &,LPVOID *)' being compiled
          with
          [
              T1=ATL::CComObject<NAlertBand>
          ]
          C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\atlmfc\include\atlcom.h(2095) : see reference to class template instantiation 'ATL::CComCreator<T1>' being compiled
          with
          [
              T1=ATL::CComObject<NAlertBand>
          ]
          C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\atlmfc\include\atlcom.h(2091) : while compiling class template member function 'HRESULT ATL::CComCreator2<T1,T2>::CreateInstance(void *,const IID &,LPVOID *)'
          with
          [
              T1=ATL::CComCreator<ATL::CComObject<NAlertBand>>,
              T2=ATL::CComFailCreator<-2147221232>
          ]
          NAlerts.cxx(44) : see reference to function template instantiation 'HRESULT ATL::CComCreator2<T1,T2>::CreateInstance(void *,const IID &,LPVOID *)' being compiled
          with
          [
              T1=ATL::CComCreator<ATL::CComObject<NAlertBand>>,
              T2=ATL::CComFailCreator<-2147221232>
          ]
          NAlerts.cxx(44) : see reference to class template instantiation 'ATL::CComCreator2<T1,T2>' being compiled
          with
          [
              T1=ATL::CComCreator<ATL::CComObject<NAlertBand>>,
              T2=ATL::CComFailCreator<-2147221232>
          ]
  QMessage.cxx

谢谢

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2013-01-16 09:36:47

下面是一个类似的线程-- http://social.msdn.microsoft.com/Forums/en-US/vclanguage/thread/d6144eaa-fa37-4133-87a0-75a06633209b

请把其余的错误也发出来。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/14353184

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档