System Configuration

System customization is performed thanks to the "" file which must be in the sub-directory "sys" of the installation directory.

When the system name is correctly set in the file "", SmartEiffel performs some automatic customizations. For example, if the "" file contains the string "DOS", SmartEiffel uses the suffix ".BAT" for script files and the suffix ".EXE" for executables files.

The "sys" directory contains various files to customize SmartEiffel with the system, the C compiler and the linker used as well as the default loadpath used to look for Eiffel source code.

The SmartEiffel Environment Variable

Environment variable SmartEiffel must be set with the absolute path of the file "" which is in the sub-directory "sys" of the installation directory.
Under a UNIX-like system, the value of the SmartEiffel environment variable may be for example: /usr/lib/SmartEiffel/sys/
The contents of the file "" indicate the system you are running.


The first word of file "" is used by SmartEiffel to know which operating system is running. Currently supported values are:
UNIX for all UNIX-like systems, GNU/Linux, HP-UX, Solaris, SunOS, Irix, XENIX, etc.
Windows for Windows 95 and Windows NT systems (using long filenames).
DOS for MS-DOS systems or Windows 3.x (using short filenames, with 8.3 scheme).
Macintosh for Macintosh systems (68K and PPC)
BeOS for the BeOS system
Amiga for the Amiga system
OS2 for IBM OS/2 systems
VMS for the VMS systems

You must choose the appropriate system name in the previous list and update file "". To be sure that the previous list is up-to-date, just put a bad system name in the file "" and then run for example command compile.

The system name will then be used to access various files corresponding to the system you chose. For example, if you declared "Windows", only files with extension "Windows" will be considered (e.g. files like "loadpath.Windows", "compiler.Windows", "linker.Windows", etc...).


This file is used to select the default C compiler that will be used to compile the generated C code. Only the first line of this file is considered; it must contain the name of one of the supported compilers, which at the current time are:
gccThe free and open-source GNU C Compiler and its variants (egcs, mingw32, etc.) on several platforms (Linux and other UNIXes, Windows).
ccThe standard cc compiler, as provided by vendors of most UNIX and VMS systems.
lcc-win32The free port of lcc for Windows platforms.
bcc32The Borland (now Inprise) C/C++ compiler on Windows platforms.
bcc32iA variant of the previous one.
wcl386The Watcom C/C++ compiler for Windows plaforms.
clThe MicroSoft C/C++ compiler for Windows platforms.
sas_cThe SAS C compiler, sc on Amiga platforms.
diceThe dice C compiler.
vbccThe vbcc C compiler.
cccThe Compaq C compiler for AlphaLinux.
tccThe Tiny C Compiler. Fast and small (Windows or Linux)

SmartEiffel will automatically generate the correct system call to this C compiler, with the appropriate linker and adequate object files suffix.

In case an unknown compiler name is supplied, SmartEiffel generates an error message listing the supported compiler names. In case the compiler specified is a correct one but can't be found, SmartEiffel won't be able to detect it, but there will be an error message from the system. In -verbose mode, the systems calls to the C compiler are displayed, thus making it easy to find such errors.

Changing the Default Loading Path

All the commands use the same algorithm to search for Eiffel source files. The default global loading path is set using contents of file loadpath.<system_name>, in the sys directory of your SmartEifel installation, where <system_name> is one of the systems symbols mentioned above.

To change this default loading path, you need to add a special file which name is "" in the directory in which you type a command of SmartEiffel (compile, finder, pretty, compile_to_c, compile_to_jvm, short, clean).

Each line of the file "" must be an existing directory path or the absolute path of another "" file to include recursively. Environment variable may be used in these lines, with the syntax ${MY_VAR}.

Additional information about the ${SmartEiffelDirectory} variable: If not explicitely set by the user, the ${SmartEiffelDirectory} variable is autmatically computed using the value of the ${SmartEiffel} variable. (Keep in mind that the ${SmartEiffel} is mandatory to use SmartEiffel.) The computed value indicates the SmartEiffel main directory. For example, if the ${SmartEiffel} value is "/usr/local/lib/SmartEiffel/sys/" the computed value is "/usr/local/lib/SmartEiffel/". This automatically defined variable ${SmartEiffelDirectory} is useful to indicate the place of the SmartEiffel standard library.

All directories of the local "" file are added ahead of the default loading path. All directories are searched in the order in which they appear. The current directory is not included in the search path unless it is explicitely specified in one of the or loadpath.system files. Also note that an empty line in a file may add the current working directory in a place you don't want.

To check that your loading path is correctly set, just type command finder using an unknown class name as argument.

Sample file under UNIX


The first line is an absolute path to some directory.
The second one is a relative path to some directory.
The third line shows the use of an environment variable to point to some directory.
The fourth line also features an environment variable, but points to a second loadpath file, that will be included before the general loadpath.UNIX file.
The fifth line adds the current directory to the loadpath.

Sample file under Windows


Same explanations as above, except of course that this file is prepended in front of the loadpath.Windows file.

Copyright © Dominique COLNET and Suzanne COLLIN - <>
Last modified: Fri Sep 6 16:56:21 MET DST 2002