
What I always liked about other compilers was the ease to compile simple examples. Just write a C file and call
gcc hello_world.c
This mechanism is also available in the new version of EiffelStudio. So when you want to do a quick test, just write your root class and call
ec hello_world.e
It is even possible to use some libraries in your example. If you need Vision2 for example, just add a library argument to the commandline:
ec hello_gui_world.e -library vision2
ec hello_gui_world.e -library vision2 -library gobo
When you do a single file compilation the Eiffel compiler does the following:
- The filename is taken to look for an ecf file with the same name as the class file.
- If it does not yet exist, a new ecf file is generated. It consists of:
- A target with the same name as the class file
- The class name as root class and make as root feature
- The directory of the class file as root cluster
- The setting console application set as true unless Vision2 or WEL is used as a library.
- EiffelBase and libraries set via the commandline option added.
- A workbench compilation is done using the ECF file.
- The generated executable is copied into the current working directory.
I believe this mechanism makes it a lot easier to write simple examples in Eiffel by removing the work of writing a configuration file by hand or the need of using EiffelStudio for this.
- juliant's blog
- Login or register to post comments
-

Comments
I'm sure this is going to be
I'm sure this is going to be appreciated by the students. I will make sure that they come and use eiffelroom and see your blog posts. This will help lower the entry barrier for Eiffel newcomers. Thanks for the hard work.