Quantcast
Channel: Intel® C++ Compiler
Viewing all articles
Browse latest Browse all 1616

D

$
0
0

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

Syntax

Linux OS and OS X:

-Dname[=value]

Windows OS:

/Dname[=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, Dname=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".

Caution

On Linux* and OS X* systems, if you are not specifying a value, do not use D for name, because it will conflict with the -DD option.

IDE Equivalent

Windows: Preprocessor > Preprocessor Definitions

Linux: Preprocessor > Preprocessor Definitions

OS X: Preprocessor > Preprocessor Definitions

Alternate Options

None

Example

To define a macro called SIZE with the value 100, enter the following command:

On Windows* systems:

icl /DSIZE=100 prog1.cpp

On Linux* systems:

icpc -DSIZE=100 prog1.cpp

On OS X* systems:

icpc -DSIZE=100 prog1.cpp

If you define a macro, but do not assign a value, the compiler defaults to 1 for the value of the macro.

Inglés

Viewing all articles
Browse latest Browse all 1616

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>