mirror of
https://github.com/EiffelSoftware/eiffel-org.git
synced 2025-12-07 07:12:25 +01:00
git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@2112 abb3cda0-5349-4a8f-a601-0c33ac3a8c38
36 lines
2.2 KiB
Plaintext
36 lines
2.2 KiB
Plaintext
[[Property:title|Compiling an Eiffel system for CECIL]]
|
|
[[Property:weight|1]]
|
|
[[Property:uuid|94a549df-1919-9dcd-82b3-1cd82e064a03]]
|
|
==Compiling your Eiffel system for CECIL==
|
|
It is very simple to "Cecilize" your Eiffel system, that is to say make its features available from the outside through CECIL. You will compile it as you normally would - either freeze it or finalize it. The only supplementary precaution is to make the features and classes that will be used by CECIL [[Group Options|visible]].
|
|
|
|
==Building a CECIL archive==
|
|
The EiffelStudio compiler produces both C code and a "Makefile". The Makefile compiles and links that C code in a subdirectory one level below the EIFGENs directory of a project. For frozen/melted code, the Makefile is located in the W_code subdirectory. For finalized code, it is in the F_code subdirectory.
|
|
To produce a CECIL library, you must: open a shell (unix) or the MS-DOS prompt (Windows), go to the subdirectory that contains the Makefile, and then type:
|
|
|
|
|
|
<code> make cecil </code> (on unix and on windows with Borland)
|
|
<code> nmake cecil </code> (on windows with VC++)
|
|
|
|
This generates a CECIL archive whose name derived from the name system name of the Eiffel system, as follows:
|
|
|
|
|
|
<code> lib<system name>.a </code> (on unix)
|
|
<code> lib<system name>.lib </code> (on Windows)
|
|
|
|
|
|
For example, the corresponding archive for an Eiffel system called "test", would be called either "libtest.a" (Unix) or "libtest.lib" (Windows).
|
|
Note that through CECIL you can use an Eiffel system compiled in any of the Eiffel compilation modes:
|
|
* Finalized C code.
|
|
* Workbench (melted/frozen) code, usually for development purposes. In this case you must copy the ''<system name>.melted'' file ( where ''<system name>'' is the name of your system) located in EIFGENs\<target_name>\W_code to the directory where you intend to execute your C application from.
|
|
|
|
{{note|each time you melt the Eiffel system, the ''<system name>. melted'' file is updated. }}
|
|
|
|
{{caution|In the second case (workbench mode), it is not possible to call through the CECIL interface any routine that has been melted in the last compilation; this would raise the run-time exception: <br/>
|
|
''' $ applied to melted routine''' <br/>
|
|
The solution is simply to refreeze the system. }}
|
|
|
|
|
|
|
|
|