<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://eiffelroom.com" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>eiffelroom - Single file compilation - Comments</title>
 <link>http://eiffelroom.com/blog/juliant/single_file_compilation</link>
 <description>Comments for &quot;Single file compilation&quot;</description>
 <language>en</language>
<item>
 <title>I&#039;m sure this is going to be</title>
 <link>http://eiffelroom.com/blog/juliant/single_file_compilation#comment-116</link>
 <description>&lt;p&gt;I&#039;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.&lt;/p&gt;

</description>
 <pubDate>Sun, 11 Mar 2007 22:53:36 -0700</pubDate>
 <dc:creator>bayt</dc:creator>
 <guid isPermaLink="false">comment 116 at http://eiffelroom.com</guid>
</item>
<item>
 <title>Single file compilation</title>
 <link>http://eiffelroom.com/blog/juliant/single_file_compilation</link>
 <description>&lt;p&gt;What I always liked about other compilers was the ease to compile simple examples. Just write a C file and call  &lt;pre class=&quot;geshifilter&quot;&gt;gcc hello_world.c&lt;/pre&gt; and the compiler does the rest. Of course when you get to more complex systems you need &lt;a href=&quot;http://en.wikipedia.org/wiki/makefiles&quot;&gt;makefiles&lt;/a&gt; and the like, but for a quick test it is very convenient to be able to compile single files.&lt;/p&gt;

&lt;p&gt;This mechanism is also available in the new version of &lt;a class=&quot;&quot; style=&quot;&quot; href=&quot;/locate/EiffelStudio&quot;&gt;EiffelStudio&lt;/a&gt;. So when you want to do a quick test, just write your root class and call &lt;pre class=&quot;geshifilter&quot;&gt;ec hello_world.e&lt;/pre&gt; The compiler then generates a standard &lt;a href=&quot;http://eiffelsoftware.origo.ethz.ch/index.php/ACE_to_ECF:_The_Transition_Explained&quot;&gt;ECF&lt;/a&gt; file which you can use to open your class in EiffelStudio. This is very useful if the quick test becomes more complex and you want the power of EiffelStudio for further development.&lt;/p&gt;

&lt;p&gt;It is even possible to use some libraries in your example. If you need &lt;a class=&quot;&quot; style=&quot;&quot; href=&quot;/locate/EiffelVision2&quot;&gt;Vision2&lt;/a&gt; for example, just add a library argument to the commandline: &lt;pre class=&quot;geshifilter&quot;&gt;ec hello_gui_world.e -library vision2&lt;/pre&gt; Or if you need multiple libraries: &lt;pre class=&quot;geshifilter&quot;&gt;ec hello_gui_world.e -library vision2 -library gobo&lt;/pre&gt; These libraries will be added in addition to the &lt;a class=&quot;&quot; style=&quot;&quot; href=&quot;/locate/EiffelBase&quot;&gt;base library&lt;/a&gt;. Libraries which are shipped with EiffelStudio can be added by using only the name, for other libraries the full path to the ECF file is needed.&lt;/p&gt;

&lt;p&gt;When you do a single file compilation the Eiffel compiler does the following:&lt;/p&gt;

&lt;ul&gt;
    &lt;li&gt; The filename is taken to look for an ecf file with the same name as the class file.&lt;/li&gt;
    &lt;li&gt; If it does not yet exist, a new ecf file is generated. It consists of:&lt;ul&gt;
        &lt;li&gt; A target with the same name as the class file&lt;/li&gt;
        &lt;li&gt; The class name as root class and &lt;em&gt;make&lt;/em&gt; as root feature&lt;/li&gt;
        &lt;li&gt; The directory of the class file as root cluster&lt;/li&gt;
        &lt;li&gt; The setting &lt;em&gt;console application&lt;/em&gt; set as true unless &lt;a class=&quot;&quot; style=&quot;&quot; href=&quot;/locate/EiffelVision2&quot;&gt;Vision2&lt;/a&gt; or &lt;a class=&quot;&quot; style=&quot;&quot; href=&quot;/locate/WEL&quot;&gt;WEL&lt;/a&gt; is used as a library.&lt;/li&gt;
        &lt;li&gt; &lt;a class=&quot;&quot; style=&quot;&quot; href=&quot;/locate/EiffelBase&quot;&gt;EiffelBase&lt;/a&gt; and libraries set via the commandline option added.&lt;/li&gt;
    &lt;/ul&gt;&lt;/li&gt;
    &lt;li&gt; A workbench compilation is done using the ECF file.&lt;/li&gt;
    &lt;li&gt; The generated executable is copied into the current working directory.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;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.&lt;/p&gt;

</description>
 <comments>http://eiffelroom.com/blog/juliant/single_file_compilation#comments</comments>
 <category domain="http://eiffelroom.com/tag/compilation">compilation</category>
 <category domain="http://eiffelroom.com/tag/usability">usability</category>
 <pubDate>Sun, 11 Mar 2007 18:41:25 -0700</pubDate>
 <dc:creator>juliant</dc:creator>
 <guid isPermaLink="false">121 at http://eiffelroom.com</guid>
</item>
</channel>
</rss>
