How to compile examples using EiffelStudio

by Julian Tschannen (modified: 2007 Mar 14)

Most of the examples and tutorials you will find here come with an archive containing the source code and the files required to compile the code. Here you will find the information required to use the examples together with EiffelStudio.

Obtaining the Example

When you want to compile an example, first download the archive and extract it on your computer. You can choose between a zip or tar.gz archive, both contain the same files.

File types explained

A typical example is shipped with multiple files:

  • .e files: The Eiffel source code.
  • .ecf file: Configuration file for EiffelStudio. Use this to compile the example with EiffelStudio.

EiffelStudio IDE

When you want to use EiffelStudio to compile your program, open the example in EiffelStudio. For that, either double-click on the .ecf file in the archive (works only on Windows), or open EiffelStudio and add a new project. When asked for the project configuration, select the .ecf file from the example.

EiffelStudio Command line

If you want to compile in the command line, open the directory of the example in a console and type:ec root_class.e
Replace root_class.e with the name of the root class of the example.

After the compilation is finished the executable is in the current directory.