|
Here is the information you need if you want to call some Eiffel
features from C code. To call C functions/macros from Eiffel see
the documentation about externals
(man/external
in the distribution).
In order to call some Eiffel feature from C, you must use the
-cecil <cecil_file> option with command compile or compile_to_c.
The <cecil_file> allow you to give the list of features you want to
call from C.
When the -cecil option is used, command compile_to_c produce
an additional C heading file which includes the needed C prototypes.
The <cecil_file> must have at least two lines. The first line is the name of the C heading file to produce (it may be useful if you need to create a C library). Other lines have the following structure:
Keep in mind that the <living_type> must be really alive:
if <living_type> is ARRAY[INTEGER] for example, your Eiffel program
is suppose to create at least one ARRAY[INTEGER].
The name of the feature to call, <feature_name> may be an infix or
a prefix feature name (the syntax if the same as the one used in
Eiffel source).
As <cecil_file> is parsed by the SmallEiffel parser, it may contains
Eiffel comments.
See examples in directory SmallEiffel/lib_show/cecil/example*.
Copyright © Dominique COLNET and Suzanne COLLIN -
<colnet@loria.fr>
Last update: Wednesday June 10th, 1998