Execution of the command compile has three major steps:
Like compile_to_c, compile must have at least one argument to indicate the starting execution point of the system. Thus, execution will start in Root-Procedure of Root-Class. The default Root-Procedure is make.
All the options of command compile_to_c can be used with compile (they are simply passed to compile_to_c).
However, there are situations where you want to get rid of all the previously generated C and object files and start afresh. This occurs, for example, when you change the C compiler options: otherwise, these new options would apply only to the C files which are actually recompiled (see example 3 below).
Option -clean removes the C and object files previously generated by
calling the command clean at the end of the compilation.
compile hello_worldThe compiler should tell you what's wrong or should compile Eiffel source files telling you the full path used to load the Eiffel source code.
Under UNIX, the executable file is named "a.out" by default.
compile -boost -no_split -O3 hello_worldNote that option -O3 is passed to the C compiler (see manual of gcc). Options -boost and -no_split are passed to command compile_to_c. This is usually the best way to finalise.
Only one C file is produced (option -no_split).
compile -c_code -require_check projectThe very first time, all C files are produced and compiled. Subsequently, if you type the same command after some changes in the Eiffel source files, all C files are again produced from scratch. If you are lucky (if there are only minor changes in produced C files), only the modified C files are passed to the C compiler (object files have been saved).
Keep in mind that C compiler options are not taken in account. Thus, if you now want to do :
compile -require_check project -O3You must use the clean command first:
clean projectAll the C files will then be recompiled using the new C option -O3. You are thus assured that the new C options will be taken into account.