tidl
-Interface Definition Language compiler
tidl
[option] ...filename
[option]...
tidl
parses the input IDL and related ACF source file, and optionally generates a header file, and client and server stubs and auxiliary files. The generated source code can be compiled using compilers for Classic C, ANSI C, or C++.
The command line arguments include the input IDL source file and options to control the actions of the IDL compiler. The options are as follows:
-client
type
all
-client
option is not specified.
stub
aux
none
-server
type
all
-server
option is not specified.
stub
aux
none
-cstub
filename
.c
extension, the IDL compiler will add it. The default client stub name (if -cstub
is not specified) is the base name of the IDL source file (the simple file name without any directory prefix, or any suffix following a period) with _cstub.c
appended. The associated client stub object file is the name of the client stub file with .c
changed to .o
.
-sstub
filename
.c
extension, the IDL compiler will add it. The default server stub name (if -sstub
is not specified) is the base name of the IDL source file (the simple file name without any directory prefix, or any suffix following a period) with _sstub.c
appended. The associated server stub object file is the name of the server stub file with .c
changed to .o
.
-caux
filename
.c
extension, the IDL compiler will add it. The default client auxiliary name (if -caux
is not specified) is the base name of the IDL source file (the simple file name without any directory prefix, or any suffix following a period) with _caux.c
appended. The associated client auxiliary object file is the name of the client auxiliary file with .c
changed to .o
.
-saux
filename
.c
extension, the IDL compiler will add it. The default server auxiliary name (if -saux
is not specified) is the base name of the IDL source file (the simple file name without any directory prefix, or any suffix following a period) with _saux.c
appended. The associated server auxiliary object file is the name of the server auxiliary file with .c
changed to .o
.
-header
filename
-header
is not specified) is the base name of the IDL source file (the simple file name without any directory prefix, or any suffix following a period) with .h
appended.
-out
directory
-out
is not specified) is to put the files in the present working directory.
-keep
type
none
c_source
object
all
-I
directory
-I
is optional. The -I
option can be specified multiple times to list multiple directories. The default behavior is to search the present working directory, then the directories specified with the -I
option in the order specified, and then the system IDL directory ($TUXDIR/include
). This order is also used to pass include directories to the C preprocessor and C compiler. If a file exists in more than one directory, the first one that is found in the search order is used.
-no_def_idir
-I
options, specifies that only the present working directory be searched for import and include files. When used with one or more -I
options, specifies that only the -I
directories be searched (not the present working directory or the system IDL directory).
-cpp_cmd
"cmd
"
/lib/cpp
, /usr/ccs/lib/cpp
, or /usr/lib/cpp
(in that order) otherwise.
-no_cpp
-cpp_opt "opt"
-cpp_cmd
, -cpp_opt
, -D
and -U
arguments (in the order specified), -I
arguments (in the order specified), and the source file name (the IDL or ACF file name).
-D
name[=def]
-D
option more than once. White space following the -D
is optional.
-U
name
-U
option more than once. White space following the -U
is optional.
-cc_cmd "cmd"
-cc_cmd
is not specified) is "cc -c
".
-cc_opt "opt"
-cc_opt
is not specified) is the null string. The IDL compiler invokes a command line composed of the values for -cc_cmd
, -cc_opt
, -I
arguments (in the order specified), and the source file name (the stub or auxiliary file name).
-syntax_check
-no_warn
-confirm
-v
option, it indicates what actions would be taken without the -confirm
option without executing them (for example, messages are printed for parsing input files, creating and compiling output files).
-v
-version
-stdin
a.idl
" (for example, the default client stub file will be named "a_cstub.c
").
-cepv
-cepv
option is specified, the function names will be declared local to the client stub and a Client Entry Point Vector (array of function pointers) will be defined (globally) in the client stub with the name interface_vmajor_minor_c_epv
, where interface
is the interface name, major
is the major version number, and minor is the minor version number. The interface operations must be called indirectly using the addresses in the CEPV.
-no_mepv
interface_vmajor_minor_s_epv
, where interface
is the interface name, major
is the major version number, and minor is the minor version number, and initialized with the operation names. It is used to call the application service functions. When the -
no_mepv
option is specified, the MEPV is not generated in the server stub and the application is responsible for setting up the structure. In this way, the application can set the entry point names to whatever is used by the application instead of names based on the operations.
-error all
-port
level
case
none
-no_enum_lit
-use_const
For the IDL source file and any imported IDL files, the compiler searches for a related ACF with a .acf
suffix added to the basename of the IDL source file. The directories that are searched are the same directories specified for the C preprocessor (see -I
and -no_def_idir
above), plus ACF files are searched for in the directory specified in the IDL source file name.
The IDL filename tbase.idl
is reserved for use by the IDL compiler.
Here is an example IDL source file, math1.idl.
[uuid(2048A080-0B0F-14F8-26E0-930269220000)]
interface math1
{
import "math2.idl";
long add_op([in] long first1, [in] long second);
long sub_op([in] long first1, [in] long second);
}
Here is a sample ACF source file, math1.acf.
[auto_handle]
interface math1
{
include "stdio";
[code] add_op([fault_status,comm_status] result);
}
The following command line will compile math1.idl
generating client side only files out/math1_cs.c
and out/math1_cs.o
(no auxiliary files are needed), along with out/math1.h
. The IDL compiler will look for math2.idl
(which might have the division and multiplication operations) in the current directory, in the app
subdirectory, and in $TUXDIR/include
.
tidl math1.idl -Iapp -client all -server none -keep all
-cstub math1_cs -out app
uuidgen
(1)