Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

General options

&pagelevel(4)&pagelevel

-K arg1[,arg2...]

General input rules for the -K option can be found on "Calling syntax and general rules".
The following entries are possible as arg arguments for general control of the compilation run:

verbose
no_verbose

Note that the -K verbose specification, which causes additional information on template instantiation to be written to the standard error output stderr, is presently only meaningful with the CC command.
-K no_verbose is the default setting.

-o output_destination

If this option is omitted, the compiler generates output files with default names and places them in the current directory.
The -o option can be used to rename the various output files of a compiler run and/or have them written to a different directory.

output_destination can be any of the following: only the name of a directory, only a file name, or a file name including directory components. The specified directories must already exist.

output_destination = directory name dir

The output files are created with default names and placed in the specified directory dir as follows:

  • When an executable file is generated, the file is assigned the name dir/a.out.

  • If the -c option is specified, the object file is named dir/sourcefile.o.

  • If the -E option is specified, the preprocessor output is written to the filedir/sourcefilei.i (cc/c11/c89 command) or dir/sourcefile.I (CC command) ) instead of the standard output stdout.

  • If the -M option is specified, the preprocessor output (dependency lines for further processing with make) is written to the file dir/sourcefile.mk instead of the standard output stdout.

  • If the -P option is specified, the preprocessor output is written to the filedir/sourcefile.i (cc/c11/c89 command) or dir/sourcefile.I (CC command).

With the exception of the executable file generated by the link editor, independent output files are created for each compiled source file in cases where multiple source files are specified for compilation.

output_destination = a specified file_name or
output_destination = a specified directory and file name: dir/file_name

If an executable file is being generated or if the -o option is specified in combination with option -c, -E, -M or -P, the compiler writes the result to a file named file_name and places it in the current directory or in the directory specified with dir. Apart from the executable file generated by the link editor, a different file name may be specified for all other output files, but only if a single source file is listed for compilation in each compiler call.
If more than one input file is specified but only one output file is specified, then a warning is output and output_destination is reset to the default value.
If an executable file is created, the file name specified with -o must differ from an object file generated by the compiler or specified explicitly in the command line. For example, the following commands are rejected with errors:

cc -o hello.o hello.o
cc -o hello.o hello.c

-V

For each compiler component that is implicitly called during the execution of cc/c89/CC, the version and possibly a copyright note are written in a separate line. In the linking procedure the version of the CRTE being used and a list of the libraries used are also output.

-Y F,file-type,user_suffix

This option can be used to define user-specific suffixes in the form user_suffix for input files of type file-type in addition to the standard suffixes (see "Calling syntax and general rules").

The following entries are possible for file-type:

c++

C++ source file

c

C source file

prec++

C++ preprocessor output file

prec

C preprocessor output file

obj

Object file

lib

Static library

Example

-Y F,obj,llm

An input file named file.llm is recognized by the compiler as an object file.

--

This option ends the input of options, i.e. causes all following arguments (except for the link editor options that fall under the "operands" category) to be interpreted as file names, even if they begin with a hyphen. This makes it possible to specify file names that start with a hyphen (e.g. -hello.c).
The following link editor options are permitted after the -- option:
-l x

-l BLSLIB

-L dir (only with the cc, c11 and CC commands; in the c89 command, this entry would be interpreted as a file name!)