Solved

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

Posted on 2000-05-17
7
316 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
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
no14 challenge 14 72
Line meaning 9 88
sumHeights2  challenge 7 117
Problem to App source 6 73
This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
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.
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

830 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