Where's the beef?
- From: "AVee" <AVee@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 1 Sep 2005 08:29:41 -0700
I posted this question on 8-23, and await a "managed" response:
Is it possible to define a macro substitution in the C++ preprocessor so
that it will be replaced "as if" it were defined within the source code?
In other words, I would like the preprocessor to expand this:
#include "..\_MYPATH_\myfile.h"
to this:
#include "..\MySpecificPath\myfile.h"
without having to include this line of code in each file
#define _MYPATH_ MySpecificPath
The reason that this is so important to me is because our company has become
heavily invested in MFC, and certain capabilities (Class Wizard & Browser
features) essential to efficiently maintain large MFC projects have been
dropped in VS.NET - AND, once project files are converted to VS.NET, they are
no longer usable under previous development systems. Also, it is impossible
to turn off deprecated warning C4996 - making portability harder yet to
manage ... and suggested replacements for deprecated functions are not easily
linked into the older development system (VC6).
Since portability to VS.NET has proved to be extensive, we need to maintain
production source files under VC++ during the process. The only method that I
see is viable is by accommodating the compiler differences in compiler
dependent headers, and calling the appropriate header by means of a
predefined macro in the project.
So - in order to reliably port large amounts of (tested and reliable) code,
I need to be able to call in different header files depending on the version
of compiler that I am using - at least until Microsoft reintroduces MFC
maintenance features that were dropped. I am hoping NOT to have to introduce
gazillions of #ifdef's, only needing to remove them once porting is complete.
And by the way - it's my opinion that developers would be MORE inclined to
migrate to newer MS technologies (managed code) if MFC support were enhanced,
not diminished (so as to force our hand). On what basis can developers be
assured that their investment in the new technology will be preserved?
Anyway - when I purchased MSDN I was assured of 48 hour managed response.
It's been eight days now. Can someone answer my simple question? "Can macro
substitutions be made by the project's preprocessor or not?". If not - fine,
#ifdef's it is. If so, how?
- otherwise please suggest or point me to information on the "suggested"
method of maintaining large MFC projects while porting to emerging MS
development systems.
.
- Follow-Ups:
- Re: Where's the beef?
- From: Mikhail Arkhipov (Microsoft)
- Re: Where's the beef?
- Prev by Date: Paste key does not work anymore in editor! Need Help!
- Next by Date: Re: VSNET05 - Can't turn of C++ warning
- Previous by thread: Paste key does not work anymore in editor! Need Help!
- Next by thread: Re: Where's the beef?
- Index(es):
Relevant Pages
|