RT ,写入类似下面的代码的时候 :#include <stdio.h>
//#include <windows.h>
#include <tchar.h>
#include <afx.h>
#include <atlbase.h> CComModule _Module;BEGIN_OBJECT_MAP(ObjectMap)
OBJECT_ENTRY(CLSID_MyCircleCollectionCreator, CMyCircleCollectionCreator)
END_OBJECT_MAP( ).......................
总是报类似如下的错误 :error C2065: 'ObjectMap' : undeclared identifier
error C2501: 'BEGIN_OBJECT_MAP' : missing storage-class or type specifiers
......她说 ObjectMap 未定义.....
我调试了 vs2010 的例子代码:
C:\Program Files\Microsoft Visual Studio 10.0\Samples\2052\VC2010Samples\C++\Language\Events\MEDriver\MEDriver.sln (调试OK)
我找了一下,也没有地方 声明 'ObjectMap' 啊...人家就是不报错...请教请教 ,这里到底是怎么回事,请求指点...求帮我改正错误...
//#include <windows.h>
#include <tchar.h>
#include <afx.h>
#include <atlbase.h> CComModule _Module;BEGIN_OBJECT_MAP(ObjectMap)
OBJECT_ENTRY(CLSID_MyCircleCollectionCreator, CMyCircleCollectionCreator)
END_OBJECT_MAP( ).......................
总是报类似如下的错误 :error C2065: 'ObjectMap' : undeclared identifier
error C2501: 'BEGIN_OBJECT_MAP' : missing storage-class or type specifiers
......她说 ObjectMap 未定义.....
我调试了 vs2010 的例子代码:
C:\Program Files\Microsoft Visual Studio 10.0\Samples\2052\VC2010Samples\C++\Language\Events\MEDriver\MEDriver.sln (调试OK)
我找了一下,也没有地方 声明 'ObjectMap' 啊...人家就是不报错...请教请教 ,这里到底是怎么回事,请求指点...求帮我改正错误...
'ObjectMap' : undeclared identifier
加了后报 :
error C2065: '_Module' : undeclared identifier
//You may derive a class from CComModule and use it if you want to override
//something, but do not change the name of _Module
CComModule _Module;
#include <atlcom.h>
//You may derive a class from CComModule and use it if you want to override
//something, but do not change the name of _Module
CComModule _Module;
#include <atlcom.h>
CComModule _Module;
写在
#include <atlcom.h>
的上面........... =.=