ATL自动生成的双端口 编译出错 大哥们 帮我看看啊
D:\haha\haha.cpp(326) : error C2259: 'Chaha' : cannot instantiate abstract class due to following members:
d:\haha\haha.h(11) : see declaration of 'Chaha'
D:\haha\haha.cpp(326) : warning C4259: 'long __stdcall Chaha::QueryInterface(const struct _GUID &,void ** )' : pure virtual function was not defined
d:\haha\haha.h(42) : see declaration of 'QueryInterface'
D:\haha\haha.cpp(326) : warning C4259: 'unsigned long __stdcall Chaha::AddRef(void)' : pure virtual function was not defined
d:\haha\haha.h(42) : see declaration of 'AddRef'
D:\haha\haha.cpp(326) : warning C4259: 'unsigned long __stdcall Chaha::Release(void)' : pure virtual function was not defined
d:\haha\haha.h(42) : see declaration of 'Release'
D:\haha\haha.cpp(326) : error C2259: 'Chaha' : cannot instantiate abstract class due to following members:
d:\haha\haha.h(11) : see declaration of 'Chaha'
D:\haha\haha.cpp(326) : warning C4259: 'long __stdcall Chaha::QueryInterface(const struct _GUID &,void ** )' : pure virtual function was not defined
d:\haha\haha.h(42) : see declaration of 'QueryInterface'
D:\haha\haha.cpp(326) : warning C4259: 'unsigned long __stdcall Chaha::AddRef(void)' : pure virtual function was not defined
d:\haha\haha.h(42) : see declaration of 'AddRef'
D:\haha\haha.cpp(326) : warning C4259: 'unsigned long __stdcall Chaha::Release(void)' : pure virtual function was not defined
d:\haha\haha.h(42) : see declaration of 'Release'
大家帮我看看啊 Chaha里面包括了一个双端口的COM,这个接口是用VC插入的
我也尝试自己再添加 AddRef Release QueryInterface的实现代码
可是还是报这些 纯虚函数没有定义的错误
按道理 不会啊 而且模板已经自己生成了上述几个函数的定义 都不用我自己添代码的啊
谢谢各位大哥了,帮帮小弟!