The Interface Definition Language Compiler (idlc) command creates usage and implementation bindings for interfaces described in IDL files.
Syntax
idlc [options] filename-list
where options are described in this article and filename-list is a list of one or more IDL files.
Each file name specified in filename-list can be specified with or without a file name extension. If no file name extension is supplied, it is assumed to be ".idl".
When all of the specified input files are compiled, the idlc command returns a value of zero if no errors are detected. Otherwise, a non-zero value is returned.
Options
Options for the idlc command are preceeded with a dash (-) character and can be specified individually or run together. For example, -p -v -V or -pvV are acceptable.
Some options accept an argument. Where several options have the same argument, these options also can be specified individually or run together. For example, -p -m tie or -pm tie are acceptable.
The space between the option and its argument is optional. For example, either -mtie or -m tie are acceptable.
All options are case-sensitive, even on platforms where file names are not case-sensitive.
The following table describes each available option:
Option | Description |
-d directory-name | Specifies the directory in which to place emitted output files and directories. If none is specified, the default is the current directory. |
-V | Shows the version number of the idlc command. |
-v | Specifies verbose mode. This shows all of the internal commands (and their arguments) issued by the idlc command. |
-? (or -h) | Writes a brief description of the idlc command syntax to standard output. |
-D define-expression | Predefines a preprocessor variable for the IDL compiler. |
-I include-directory | Adds a directory to the list of directories used by the IDL compiler to find #include files. In addition to the -I option, the IDLC_INCLUDE environment variable can be used to specify a list with include-directory names separated by the PATH separator character. |
-i file-name | Specifies the name of a file to be compiled that does not have the .idl extension. Do not add an implicit .idl suffix to the file-name. |
-p | Used as a shorthand for -D__PRIVATE__. |
-e (or -s) emit-list | Specifies
a list of emitters to run. Emitters generate output files that contain language-specific
usage and implementation bindings appropriate to each named input file. The
rules used to generate the names of these output files are described in the
article entitled, "The idlc command: Emitted C++ filenames". Each emitter in the list is separated from the others by a colon (:) or semicolon (;) character. Valid emitter names are:
|
-m name[=value] | Specifies
an output modifier. A modifier can be given as a name or a name=value expression.
The emitters are sensitive to the following modifiers:
|
-J | Passes
options through to the Java interpreter used internally. For example: -J"-mx32m"sets the heap size for the interpreter to 32M. |
Environment Variables
IDLC OPTIONS
Any of the idlc command options can also be specified in the environment by adding the option to the IDLC_OPTIONS environment variable. Options specified in the IDLC_OPTIONS environment variable are treated as if they were entered on the command line before any of the actual command line options. For example, the IDLC_OPTIONS might be:
IDLC_OPTIONS="-mcpponly -mdllname=mydll"
and the command line might be:
idlc -ehh idlfile
The result is the same as if the IDLC_OPTIONS variable is not set and the command line is:
idlc -mcpponly -mdllname=mydll -ehh idlfile
IDLC_EMIT
Emitters can also be specified in an emit-list held in the IDLC_EMIT environment variable. When you run the idlc command, it looks for emitters specified by the -e or -s options, and also looks in the IDLC_EMIT environment variable. If it cannot find an emit-list in either source, then only the syntax of the named files is checked and any errors are reported. When a compilation error (but not a warning) is detected for a particular input file, the emit phase for that file is skipped.