CL Command-Line Warning D4026

Message Text

options apply to entire command line


This warning means that two command-line directives that name input files have between them an option that does not name an input file. An input file may be named directly (i.e., in its own command-line token) or via the /Tc, /To or /Tp options. The warning is issued just for the first occurrence.

The ordering of options relative to input files is irrelevant. All options apply to all input files, or at least to all those for which the application is meaningful. To intermingle options and input files is not an error, but users are warned not to depend on the compiler giving any significance to the intermingling (which perhaps it did in earlier versions). Of course, for as long as this warning remains a feature, users also cannot depend on the compiler (now) giving no significance to such intermingling. Everyone must stick to command lines of the form

cl [options] input_files [options]

and avoid

cl [options] input_files options input_files [anything]

unless they want to be warned off.