473,385 Members | 2,015 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

How to fix the given compilation issue with VS2010?

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:

class CServiceConfigurationManagerModule
: 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\serviceconfiguratio nmanager\serviceconfigurationmanagermodule.h(32): error C2504: 'CAtlServiceModuleT' : base class undefined

c:\work\main\actra5.x\projects\serviceconfiguratio nmanager\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)


Does anyone have any suggestions on how to fix this problem? Unfortunately, I cannot provide the project since it was written internally by my company.
Aug 11 '10 #1
1 2269
weaknessforcats
9,208 Expert Mod 8TB
I'm no expert but my guess would be that the ATL templates used by VS2010 ain't the templates used by VS2005.

You might try using the 2005 templates with the 2010 compiler.

At the very least I would examine the two template sets in the area where you have your problem and see what gives.

Also be sure to check the preprocess settings in the 2005 project vis-a-vis the 2010 project.

Let me know what yur find.
Aug 11 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

12
by: Bill | last post by:
When I compile the following code fragment, the compiler errors saying the variable connection is not initialized. As I understand C#, I thought it would be initialized. Please help me and explain...
6
by: thomson | last post by:
Hi all, I have compiled by .net web applicaion in my local machine , and a dll has been created on the bin Directory, And i have copied the entire application using xcopy deployment to a...
3
by: Dragon | last post by:
Hello, I developed an app which works fine in WinXP, but gives exceptions in WinME. In order to debug it, I tried to build a "makefile" to use with "vbc @file". So far I've ended up with: ...
3
by: karthik.naig | last post by:
Hi, I am writing code for an Atmega645. I use the IAR compiler (v4.2). I noticed that this piece of the code was not working. Meaning even if the if condition evaluated to 0, it did not enter...
7
by: Christof Warlich | last post by:
Hi, can anyone tell why line 6 below gives the compilation error: error: expected primary-expression before '>' token Everything works fine if MemoryBlockSizes is replaced by a constant, e.g....
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.