/cpp_opt switch

The /cpp_opt switch specifies options to pass to the C/C++ preprocessor.

midl /cpp_opt "C_preprocessor_option" file.idl

Switch Options

C_preprocessor_option

Specifies command-line option associated with the invoked preprocessor.

Note: For the Microsoft C/C++ preprocessors you must supply the /E switch as part of the C_preprocessor_option string.

Quotes are required when more than one option is used, and for spaces.

Remarks

Do not use this switch unless there is a specific reason for doing so. Consult C-Preprocessor Requirements for MIDL for important information regarding preprocessing.

The /cpp_opt switch can be used with or without the /cpp_cmd switch. Consult /cpp_cmd for details of how the preprocessor command line is constructed in either case.

The /cpp_opt switch, if specified, must always include /E in order to function correctly.

Examples

midl /cpp_cmd d:\nt\tools\ia64\cl.exe /DFLAG=TRUE /Ic:\inc filename.idl

midl /cpp_cmd "mycpp" /DFLAG=TRUE /Ic:\inc filename.idl

midl /cpp_opt "/E /DFLAG=TRUE /Ic:\inc" filename.idl

midl /cpp_cmd "cl" /cpp_opt "/E /DFLAG=TRUE /Ic:\inc" filename.idl

See also

/savePP

/cpp_cmd

General MIDL Command-line Syntax

/no_cpp

C-Preprocessor Requirements for MIDL