Devenv and #define

I am creating several projects using cmd devenv.

For some projects, I want to #define form a command line.

Is there a #define way to use cmd and devenv? I do not want to create new configurations.

+3
source share
3 answers

You can do it:

  • Add $(AdditionalPreprocessorDefinitions)to the list of project preprocessor definitions. After that, they may look likeWIN32;_DEBUG;_CONSOLE;$(AdditionalPreprocessorDefinitions);%(PreprocessorDefinitions)

  • Use msbuildinstead devenvto start the build process

  • Specify additional preprocessor definitions by adding them /p:AdditionalPreprocessorDefinitions="SOMEDEF;ANOTHERDEF"to the command line.

, , AdditionalPreprocessorDefinitions , - . VC2010, V++ msbuild.

+6

. "-D".

.

1: Visual Studio , IDE ( "-D".)

+1

devenv.exe, . . , cl.exe, .

+1

All Articles