[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

CMonthCalCtrl in VS2005

Posted on 2009-05-11
6
Medium Priority
?
372 Views
Last Modified: 2013-12-27
While trying to convert an eVC++ project to VS2005, when I do a build I get the following error:

error C2146: syntax error : missing ';' before identifier 'm_dateMatch'
error C4430: missing type specifier - int assumed. Note: C++ does not support default-int      
      

The line of code is:
CMonthCalCtrl      m_dateMatch;
0
Comment
Question by:Wanting2LearnMan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
6 Comments
 
LVL 40

Accepted Solution

by:
mrjoltcola earned 1600 total points
ID: 24353828
Check to see if afxdtctl.h is in your stdafx.h
#ifndef _AFX_NO_OLE_SUPPORT
#include <afxdtctl.h>		// MFC support for Internet Explorer 4 Common Controls
#endif

Open in new window

0
 

Author Comment

by:Wanting2LearnMan
ID: 24353912
It is in as follows:

#if defined(_AFXDLL)
#include <afxdtctl.h>            // MFC support for Internet Explorer 4 Common Controls
#endif

Thanks
0
 
LVL 39

Assisted Solution

by:itsmeandnobodyelse
itsmeandnobodyelse earned 400 total points
ID: 24353986
>>>> CMonthCalCtrl      m_dateMatch;

There are two common reasons for that error:

1. The issue is not in that line but in the line before where for example you forgot the semicolon ; or have a colon : instead.

2. You forgot to include the header for the CMonthCalCtrl

The second is that mrjoltcola assumed.

If you include a new headerfile in one of your headers you might need to make a 'Rebuild all' after in case your project uses 'Precompiled Headers' (PCH).  AFAIK all VC versions have problems to regocnize reliably changes where a new PCH was needed to be built.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 39

Assisted Solution

by:itsmeandnobodyelse
itsmeandnobodyelse earned 400 total points
ID: 24353991
>>>> #if defined(_AFXDLL)
That is only set in a dll project using MFC
0
 
LVL 40

Assisted Solution

by:mrjoltcola
mrjoltcola earned 1600 total points
ID: 24354001
Check that _AFXDLL is defined, or change to use the #ifdef I provided, it is possible the #if defined(_AFXDLL) is from older projects. I don't have any evc4 projects to refer to anymore so I cannot confirm.

Did you create a new project from scratch or convert the old one?
0
 

Author Comment

by:Wanting2LearnMan
ID: 24354066
I converted from an old project.

I could not find _AFXDLL  defined anywhere.  I used the code you provided and it has now got past this error.

Thanks all
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

With Windows Embedded Handheld, called Windows Mobile, Microsoft re-designed the user interface. The Start Icon moved down to the bottom, inside the menu bar area.   If you need to hide the Start Icon and/or the SIP (soft input panel, softwar…
You should read OS supplied guidelines before developing. I can't stress that enough. The guidelines will help you understand the reasons mobile app developers do what they do.  Apple is very particular when they review appstore submissions.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.
Suggested Courses

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question