idlc command (IDL compiler)

The Interface Definition Language Compiler (idlc) command creates usage and implementation bindings for interfaces described in IDL files.

Use this command to compile one or more files containing CORBA 2.3-compliant IDL statements and (optionally) to emit generated language bindings appropriate to each named input file.

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:


idlc command options
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:

hh
Produces C++ usage bindings. If no modifiers are present, bindings with support for remote cross-language operation are produced. The cpponly and localonly modifiers cause specialized bindings to be produced (see -mname[=value]).
sc
Produces a C++ skeleton (server-side bindings) for the basic object adapter of the Object Request Broker (ORB). If no modifiers are present, bindings with support for remote cross-language operation are produced. The cpponly and localonly modifiers cause specialized bindings to be produced (see -mname[=value]).
uc
Produces local implementations needed by the C++ usage bindings. If no modifiers are present, bindings with support for remote cross-language operation are produced. The cpponly and localonly modifiers cause specialized bindings to be produced (see -mname[=value]).
ih
Produces a C++ implementation header.
ic
Produces a template file for the C++ object implementation code.

-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:
LINKAGE=value
Used to insert customized C++ linkage modifiers into the generated bindings.
notcconsts
Eliminates the generation of C++ TypeCode constants and overloaded any operators.
tie
Generates "tie-style" bindings that assume delegation rather than inheritance.
cpponly
Suppresses the production of cross-language bindings and produces standard CORBA C++ bindings suitable for use with a stand-alone ORB. cpponly affects the bindings produced by the hh, sc, and uc emitters.
localonly
Generates bindings that only can be used to access a local object for all of the most-derived interfaces in the IDL file.
IRforce
Causes the interface repository (IR) emitter to destroy objects already present in the IR with the same name as in the IDL being produced.
dllname=value
Puts Microsoft Windows NT import, export, or both specifications into classes contained in the DLL named by value.
preInclude=file-name
Adds the line:
#include file-name
to the .hh file, just before the line that includes corba.h.
postInclude=file-name
Adds the line:
#include file-name
just before the end of the .hh file.
-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.


Related concepts
Interface Definition Language (IDL)
Related reference
idlc command: Emitted C++ filenames



Searchable topic ID:   rcor_idldlc
Last updated: Jun 21, 2007 8:07:48 PM CDT    WebSphere Business Integration Server Foundation, Version 5.0.2
http://publib.boulder.ibm.com/infocenter/wasinfo/index.jsp?topic=/com.ibm.wasee.doc/info/ee/corba/ref/rcor_idldlc.html

Library | Support | Terms of Use | Feedback