Solved

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

Posted on 2000-05-17
7
313 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
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 

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 AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Suggested Solutions

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
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.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

803 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