1 Using the IC compiler
1.1 Introduction
The IC application is an Erlang implementation of an IDL compiler. Several back-ends are supported. The IDL compiler generates server behaviors and client stubs according to the IDL to Erlang mapping. Interface inheritance is supported. The compiler also performs a limited subset of the IDL semantic checks.
Five back-ends are currently supported:
- IDL to Erlang CORBA.
- IDL to (plain) Erlang.
- IDL to generic Erlang Server.
- IDL to generic Erlang Server with C clients.
- IDL to C server switch with generic Erlang Server functionality.
1.2 Compiling IDL files.
The compiler is used by calling ic:gen/1 or ic:gen/2 functions in an Erlang shell:
- ic:gen/1 is used to compile files with only default settings.
- ic:gen/2 is used to compile files with an additional option list.
Example compiling a file
example.idl
:
- This will generate code for the
default
back-end.
1> ic:gen(example). Erlang IDL compiler version 2.5.1 ok 2>- This will generate code for the generic Erlang server.
1> ic:gen(example,[{be,erl_genserv}]). Erlang IDL compiler version 2.5.1 ok 2>1.3 Compiler configuration.
There are a number of compiler options available to the user, which can be configured by either:
- Using a configuration file, or
- By using command line options on ic:gen/2.
Please read the manual page for information about valid options and use of the configuration file.