Skip to main content

IAR Embedded Workbench for RX 5.20

-D

In this section:
Syntax

-D symbol[=value]

Parameters

symbol

The name of the preprocessor symbol

value

The value of the preprocessor symbol

Description

Use this option to define a preprocessor symbol. If no value is specified, 1 is used. This option can be used one or more times on the command line.

The option -D has the same effect as a #define statement at the top of the source file:

-Dsymbol

is equivalent to:

#define symbol 1

To get the equivalence of:

#define FOO

specify the = sign but nothing after, for example:

-DFOO=

Caution

Project>Options>C/C++ Compiler>Preprocessor>Defined symbols