Developer Guide and Reference

Contents

D

Defines a
macro name
that can be associated with an optional value.

Syntax

Linux:
-D
name
[
=
value
]
Windows:
/D
name
[
=
value
]
Arguments
name
Is the name of the
macro
.
value
Is an optional integer or an optional character string delimited by double quotes; for example,
D
name=string
.
Default
OFF
Only default symbols or macros are defined.
Description
Defines a
macro name
that can be associated with an optional value.
This option is equivalent to a #define preprocessor directive.
If a
value
is not specified,
name
  is defined as "1".
IDE Equivalent
Visual Studio:
Preprocessor > Preprocessor Definitions
Eclipse:
Preprocessor > Preprocessor Definitions
Alternate Options
None
Example
To define a macro called SIZE with the value 100, enter the following command:
On Windows* systems:
icx /DSIZE=100 prog1.cpp ! specific to C++
dpcpp /DSIZE=100 prog1.cpp ! specific to DPC++
On Linux* systems:
icpx -DSIZE=100 prog1.cpp ! specific to C++
dpcpp -DSIZE=100 prog1.cpp ! specific to DPC++
If you define a macro, but do not assign a value, the compiler defaults to 1 for the value of the macro.

Product and Performance Information

1

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.