I am facing issues with a project called ServiceConfigurationManager in Visual Studio 2010. The project compiles without a hitch in Visual Studio 2005, it also compiles perfectly if I change the Platform Toolset to v90 in the Property Pages. The project is an EXE which uses both ATL and MFC.
When I try to execute the following line of code in a file called ServiceConfugrationManagerModule.h:
: public CAtlServiceModuleT <CServiceConfigurationManagerModule, IDS_SERVICENAME>, public CWindowImpl<CServiceConfigurationManagerModule>
I'm met with a barrage of errors, the most important of which is:
c:\work\main\actra5.x\projects\serviceconfigurationmanager\serviceconfigurationmanagermodule.h(32): error C2504: 'CAtlServiceModuleT' : base class undefined
c:\work\main\actra5.x\projects\serviceconfigurationmanager\serviceconfigurationmanagermodule.h(32): error C2143: syntax error : missing ',' before '<'
Note that CAtlServiceModuleT is defined in atlbase.h. I am not entirely sure of the problem, but I suspect that somehow a macro called _ATL_NO_SERVICE is incorrectly defined due to some setting. In atlbase.h, CAtlServiceModuleT is defined following the statement '#ifndef _ATL_NO_SERVICE'. (Note that atlbase.h is included in my stdafx.h, which in turn is included in ServiceConfigurationModule.h)
Do you have any suggestions on how to fix this problem? Unfortunately, I cannot provide the project since it was written internally by my company.
Yes, I've taken into consideration that CAtlServiceModuleT is defined under ATL. In my stdafx.h, I have a line saying using namespace ATL. Please do note that this project was compiling in earlier versions of Visual Studio 2010.