|<< 2 Installing Euphoria||< 3.4 Distributing a Program||Up: 3 Using Euphoria||>||4 Language Reference >>|
3.5 Command line switches
You can launch Euphoria with some extra command line switches, in order to add or change configuration elements. When running a GUI, there is always some way to open a prompt and enter any text with options, arguments and whatever the program being launched may need for proper, expected operation. Under Windows, this is achieved by clicking the Start button and selecting Run..., or hitting Windows-R.
Command line switches may be changed or added, one at a time.
In the table below, (all) indicates that the given switch applies to the Interpreter, Translator and Binder. Use of (interpreter), (translator) and/or (binder) indicates that the referenced switch applies only to that execution mode.
- -BATCH (all)
- Executes the program but if any error occurs, the "Press Enter" prompt is not presented. The exit code will be set to 1 on error, 0 on success. This option can also be set via the with batch directive.
- -COM dir (translator)
- Specifies the include directory for the C compiler once EUPHORIA code is translated.
- This should be set such that dir/include/euphoria.h exists.
- -COPYRIGHT (all)
- Displays the copyright banner for euphoria.
- -C config_file (all)
- Specifies either a file name or the path for where the default file called eu.cfg exists. The configuration file which holds a set of additional command line switches. See Also Configuration file format
- -CON (translator)
- Windows only. Specifies that the translated program should be a console application. The default is to build a windowed application.
- -D word (all)
- Defines a word as being set. Words are processed by the ifdef statement. Words can also be defined via the with / without define directive.
- -DEBUG (translator)
- Enable debug mode for the generated code.
- -DLL, -SO (translator)
- Compiles and links the translated euphoria code into a DLL, SO or DYLIB (depending on the platform).
- -EUDIR dir (all)
- This overrides the environment variable EUDIR.
- -H, (all)
- Displays the list of available command line options.
- -I include_path (all)
- Specifies an extra include path.
- -LIB file (translator)
- Specifies the run-time library to use when translating euphoria programs.
- -PLAT word (translator)
- Specify the target platform for translation. This allows euphoria code to be translated for any supported platform from any other supported platform. Supported platforms: FREEBSD, LINUX, NETBSD, OPENBSD, OSX, WINDOWS
- -STRICT (all)
- This turns on all warnings, overriding any with/without warning statement found in the source. This option can also be set via the with/without warning directive.
- -TEST (all)
- Parses the code only and issues any warnings or errors to STDOUT. On error the exit code will be 1, otherwise 0. If an error was found, the normal "Press Enter" prompt will not be presented when using the -TEST parameter which enables many editor/IDE programs to test the syntax of your Euphoria source in real time.
- -VERSION (all)
- Displays the version of euphoria that is running.
- -W warning_name (all)
- Resets, or adds to, the current list of warnings that may be emitted. The list of known names is to be found in the subsection with/without warning. A name should appear without quotes. If the warning_name begins with a plus symbol '+', this warning is added to the current set of warnings checked for, otherwise the first usage resets the list to the warning being introduced, and each subsequent -W warning_name adds to the list.
- -WF file_name (all)
- Sets the file where the warnings should go instead of the standard error. Warnings are written to that file regardless of whether or not there are errors in the source. If there are no warnings, the -wf file is not created. If the -wf file cannot be created, a suitable message is displayed on STDERR and written to ex.err.
- Resets, or adds to, the list of warnings that will not be issued. This is opposite of the -W switch.
3.5.1 Further notes
- Included files are searched for in all included paths, in the following order:
- The current path
- Paths specified in a -I command line switch, which can also come from any configuration files found.
- Paths listed in the EUINC environment variable, in the order in which they appear
- Paths listed in the EUDIR environment variable, in the order in which they appear
- The interpreter's path