Solved

Errors when moving from VC5.0 to VC6.0...

Posted on 2000-05-17
7
311 Views
Last Modified: 2013-11-20
Hi,

I have a many code modules, which use a their own makefiles with inter-dependencies to build a few libs/dlls etc. This used to work fine with VC5.0. But now I would like it to build under VC6.0. During the build under 6.0 SP3, the following errors are generated from most of the .cpp files:

c:\vc98\vc98\mfc\include\afxdlgs.inl (104) : error C2065: 'PSH_WIZARD97' : undeclared identifier

c:\vc98\vc98\mfc\include\afxext.h (526) : error C2065: 'RBBS_GRIPPERALWAYS' : undeclared identifier

Any idea why it's displaying these error and failing the build? WHat should I do to make it build under VC6.0 successfully?

Thanks in advance!
0
Comment
Question by:baigmz
  • 5
  • 2
7 Comments
 
LVL 11

Accepted Solution

by:
mikeblas earned 100 total points
ID: 2817458
The system headers changed between VC5 and VC6. In the VC6 versions, many symbols are protected by conditional directives to help avoid compatibility problems.

Before including any headers (for example, at the top of your STDAFX.H), you need to indicate that you want to use the newest IE-based features. That'll get you the symbols you're missing. Just throw this define:

#define _WIN32_IE 0x0400

and you'll be all set.  If it doesn't work, you've done it wrong.

..B ekiM


0
 

Author Comment

by:baigmz
ID: 2817742
Thanks for your response.
I have a few questions based on your answer:

Do I need to use the directive you've indicated even if my code doesn't involve any kind of IE functionality?

About 80% of my code is raw C++ and C with rest of it being MFC. Is there any side effect to this change (eg. increase in binary file size, end-user requirements etc.)?

Thanks again.
0
 

Author Comment

by:baigmz
ID: 2817766
Thanks for your response.
I have a few questions based on your answer:

Do I need to use the directive you've indicated even if my code doesn't involve any kind of IE functionality?

About 80% of my code is raw C++ and C with rest of it being MFC. Is there any side effect to this change (eg. increase in binary file size, end-user requirements etc.)?

Thanks again.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:baigmz
ID: 2817782
One more question:

I tried out the _WIN32_IE macro.
I get back a warning during the build, which says:

..\stdafx.h(6) : warning C4005: '_WIN32_IE' : macro redefinition

Is this warning ignorable or is it recommended to include it's definition file (.h)?
0
 

Author Comment

by:baigmz
ID: 2817879
One more question:

I tried out the _WIN32_IE macro.
I get back a warning during the build, which says:

..\stdafx.h(6) : warning C4005: '_WIN32_IE' : macro redefinition

Is this warning ignorable or is it recommended to include it's definition file (.h)?
0
 

Author Comment

by:baigmz
ID: 2818206
One more question:

I tried out the _WIN32_IE macro.
I get back a warning during the build, which says:

..\stdafx.h(6) : warning C4005: '_WIN32_IE' : macro redefinition

Is this warning ignorable or is it recommended to include it's definition file (.h)?
0
 
LVL 11

Expert Comment

by:mikeblas
ID: 2824052
> ..\stdafx.h(6) : warning C4005: '_WIN32_IE' : macro redefinition

 > Is this warning ignorable or is it recommended to include it's  > definition file (.h)?

That probably means you didn't follow my instructions. You should put this definition ahead of any other #include directives.  It's got to be nearly the first thing the compiler sees.  Either you're including other stuff before you include STDAFX.H, or you've got a /D option on the compiler command line that's setting the same symbol.

 > Do I need to use the directive you've indicated even if
 > my code doesn't involve any kind of IE functionality?

But, it does!  The symbols you're using are offered by system DLLs updated when current versions of IE are installed.

 > , end-user requirements etc.)?

Since you're already using those styles, you had those requirements before adding this explicit declaration.

..B ekiM
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
how to you can convert your project to a Maven project and the Maven plugin should download the source 1 43
has22 challenge 11 80
has77  challenge 9 73
Line meaning 9 82
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

863 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now