## 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.

Six 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
- IDL to Java mapping, where Java client stubs and server skeletons are generated

While the first back-end (IDL to Erlang CORBA) is intended for pure CORBA functionality, the rest are specially designed to allow portable and efficient links between different languages and virtual machines.

### 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.

Copyright © 1991-2002 Ericsson Utvecklings AB