Click here to Skip to main content
13,005,973 members (105,183 online)

Compiling a project in Visual Studio 2010

Merwan Hade asked:

Open original thread
I am facing issues with a project called ServiceConfigurationManager, using Visual Studio 2010. To be more specific, when I try to execute the following line of code in a file called ServiceConfugrationManagerModule.h:

class CServiceConfigurationManagerModule
    : public CAtlServiceModuleT <cserviceconfigurationmanagermodule,>, 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 '<'

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 settings. 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)

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.

Does anyone have any suggestions on how to fix this problem? Unfortunately, I cannot provide the entire code since it was written internally by my company.
Tags: C++, Visual-Studio, MFC, ATL


When answering a question please:
  1. Read the question carefully.
  2. Understand that English isn't everyone's first language so be lenient of bad spelling and grammar.
  3. If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem. Insults are not welcome.
Let's work to help developers, not make them feel stupid.
Please note that all posts will be submitted under the The Code Project Open License (CPOL).

Advertise | Privacy | Mobile
Web02 | 2.8.170628.1 | Last Updated 26 Mar 2009
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100