Eiffel Home Page (Web) -- Getting started with Eiffel (local) Eiffel Home PageEiffel Home Page

Previous, Up, NextPrevious sectionUpNext section

4 COMPILING AND EXECUTING A SYSTEM

           Help reading this manual

EiffelStudio first comes up with a window and a dialog on top of it; the dialog looks like this (from here on the look-and-feel will be different on non-Windows platform, but the contents will be the same):

As this is our first project we want to Create a new project. The three possibilities are:

In future sessions you'll probably use the first option for a new project, as it takes care of generating everything for you, and the third option for an existing project. Right now, though, we want you (like an expert EiffelStudio user!) to use an existing Ace that exists precisely for the purpose of this Tour. So please select the second option

and click Next . This brings up a File Explorer inviting you to select an Ace file. The file you want is, depending on your platform, one of

(the first one for Windows, the second for Unix; remember that $ISE_EIFFEL stands for the location of the Eiffel installation, such as C:\Eiffel50 ; Ace files are normally marked by the .ace file extension). For VMS, select the Unix variant.

Use the File Explorer to go to the directory $ISE_EIFFEL/examples/bench/tour/ and select the appropriate file, mswin.ace or unix.ace , for your platform. A confirmation window comes up:

Click OK to confirm. This selects the Ace file and starts compilation of your project.

During Eiffel compilation, a progress bar displays the successive compilation steps, or "degrees". The bulk of our little project is the EiffelBase library, which the EiffelStudio installation procedure has precompiled; so just now there's only a few extra classes to compile, and the process is almost instantaneous on a state-of-the-art computer. Even if you had to compile the EiffelBase classes, EiffelStudio compilation is so fast that you would hardly have the time to read the "degree" messages; you can see them later in compilations of bigger classes and systems.

On an IBM Thinkpad, Pentium III 850 MHz, 256 MB, running Windows 2000 Professional, Eiffel compilation takes about 9 seconds for the entire Guided Tour system including non-precompiled EiffelBase.

After Eiffel compilation completes you will see the message

At this stage you can start using EiffelStudio, e.g. for browsing, but since C compilation won't take long either (about 15 seconds on our test machine), it's just as well to let it finish. C compilation messages will appear:

Why C compilation? ISE Eiffel under some circumstances uses C as intermediate code for its compiler's generated code, and relies on a C compiler to process the result. On Windows you will by default use the command-line Borland compiler (included with the ISE Eiffel delivery); you may replace it by another, such as Visual C/C++ from Microsoft (available directly from ISE) if you wish. On Unix you will use the resident C compiler.

EiffelStudio reports that the C compilation has terminated:

Congratulations! You have successfully compiled your first Eiffel project. More precisely it's been both "melted" and "frozen". Strange terminology, you may think; in a little while we'll see why these compilation steps are called that way.

Executing the system

The system doesn't do anything exciting, but let's execute it anyway. Find the execution icon ("Run with breakpoints") at the top of the EiffelStudio window:

It would be OK too to use the neighboring icon to the left, "Run without breakpoints", since we haven't set any breakpoints. Click either icon to execute the system.

This little application doesn't use graphics or anything fancy but simply creates some objects and displays some information. Output done using the default EIffel I/O (from the EiffelBase classes ANY and STANDARD_FILES ) goes to a console. On Unix/Linux and VMS it's the window from which you started EiffelStudio. On Windows it's by default a new console window that comes up when and if the system does its first output operation, and stays up:


The message " Press Return to finish the execution " would not appear if you executed the system from outside of EiffelStudio, for example from a command line. Its purpose within EiffelStudio is clear: to let you see the console output; without it, the console would go away at the end of execution. (None of this applies to Unix/Linux/VMS since there is no new console window to get rid of.)

If before closing the console window you look at the main EiffelStudio window (by moving away the console window) you will notice that it looks different from before, since it now shows the fields useful in monitoring execution and debugging. But we'll look at this later. For the moment just dismiss the console by following the advice to " Press Return ": hit the Return or Enter key.

Previous, Up, NextPrevious sectionUpNext section

Eiffel Home Page (Web) -- Getting started with Eiffel (local)