Proprocessor Definitions don't work?
-
I'm having a problem with preprocessor definitions in .net 2k3. Basically, if I add my custom define through the project settings dialog it doesn't seem to be noticed in code with a simple #ifdef check. Of course, if I do a #define in code then my #ifdef checks ok. This used to work fine through the vs6 project settings, so what happened to .net 2k3? Anyone know what changed or how to make this work?
-
I'm having a problem with preprocessor definitions in .net 2k3. Basically, if I add my custom define through the project settings dialog it doesn't seem to be noticed in code with a simple #ifdef check. Of course, if I do a #define in code then my #ifdef checks ok. This used to work fine through the vs6 project settings, so what happened to .net 2k3? Anyone know what changed or how to make this work?
That's very odd. Are you sure you're editing the options for the right configuration? I think if you've specified the /u (Undefine all predefined symbols) [case-sensitive, /U undefines a single symbol] switch, that overrides any definitions made on the command line with /D. If you check the build log that the compiler generates, that should show what options were passed to the compiler.
-
That's very odd. Are you sure you're editing the options for the right configuration? I think if you've specified the /u (Undefine all predefined symbols) [case-sensitive, /U undefines a single symbol] switch, that overrides any definitions made on the command line with /D. If you check the build log that the compiler generates, that should show what options were passed to the compiler.
I don't have /u set and I definately didn't /U the one I am trying to add. All four default defines are present, but mine is not. This works for new projects, but seemingly not for VS6 projects that were converted to VS .NET. There must be a way somewhere to correct this! MS backwards compatability is a joke.
-
I don't have /u set and I definately didn't /U the one I am trying to add. All four default defines are present, but mine is not. This works for new projects, but seemingly not for VS6 projects that were converted to VS .NET. There must be a way somewhere to correct this! MS backwards compatability is a joke.
I finally found the problem in case anyone was or will be interested. It seems that individual files under the project can be set not to inherit from the project properties. For some reason, when I convert my VS6 projects to VS.NET, all cpp files got set to NOT inherit from the project. Go figure.