| Online Eiffel Documentation

EiffelStudio

# 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 Add Project. We could also

- " Create project ", which would let you select one among the common schemes -- basic application, graphical Windows application, graphical multi-platform application, Microsoft .NET application -- and set up everything for you.
- " Open project ", which would let you open a previously added project..

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 second option for an existing project.

Right now you first have to add the project, so click on Add Project. This brings up a File Explorer inviting you to select an ECF file. The file you want is

    	$ISE_EIFFEL\examples\studio\tour\simple.ecf

remember that $ISE_EIFFEL stands for the location of the Eiffel installation, such as C:\Eiffel50 ; ECF files are normally marked by the .ecf file extension).

Use the File Explorer to go to the directory $ISE_EIFFEL/examples/studio/tour/ and select the appropriate file.You will then be back on the startup dialog.

Click Open to confirm. This 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

    	Eiffel Compilation Succeeded

At this stage your project is finished compiled and you can start using EiffelStudio.

Congratulations! You have successfully compiled your first Eiffel project. More precisely it's been both "melted". 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 Next >>