-D
name
-D
name
=
value
You can define preprocessor macros using the -D option. The macro definitions are passed on to the respective language compiler which is responsible for interpreting the definitions and providing them to the programmer within the language.
The first form above defines the macro name but without an associated replacement value, and the second defines the same macro with the replacement value value.
To define preprocessor macros for a project:
To define preprocessor macros for a particular file:
The Preprocessor Definitions property is a semicolon-separated list of macro definitions, for example “name1=value1;name2=value2”. Clicking the button at the right of the property displays the Preprocessor Definitions dialog which will allow you to easily edit the definitions.
The following defines two macros, SUPPORT_FLOAT with a value of 1 and LITTLE_ENDIAN with no replacement value.
-DSUPPORT_FLOAT=1 -DLITTLE_ENDIAN