Running ResCompiler

ResCompiler is a stand-alone executable that "compiles" an ASCII Resource file (.arc) into a BASIS Resource file (.brf).

To run ResCompiler, enter the following command:

rescomp {command_line_options} input_files

Parameter

Description

command_line_options

Command line options, contained in the table below.

input_files

ASCII resource files to be compiled.

Command Line Guidelines

The following guidelines apply to ResCompiler command lines:

  • Enter all command line information on one line.

  • Command line options and input files can be specified in any order.

  • Command line options do not have to be specified before input files.

  • Input files typically have an .arc (ASCII resource file) extension, while output files typically have a .brc. (binary resource file) extension.

  • If the command line options do not specify an output filename for an input file coming from stdin, the output file will be named stdin.brc.

Command Line Options

The following command line options can be used to modify and/or limit ResCompiler operations. The following guidelines apply to ResCompiler command line options:

  • All command line options are case sensitive.

  • The -n and -v options are global options and affect all resource files, regardless of location on the command line.

  • The -D, -I, and -U command line options take effect in the order specified on the command line.

  • Option

    Description

    -Dname

    Defines the name.

    -Dname=value

    Defines the name as a value. The value can be either numeric, for example, -Dversion=5, or a string enclosed in quotes, such as -Dname="Order".

    -Idirectoryname

    Adds an additional directory to the list of directories ResCompiler searches for include files. The current directory is searched first. Forward slashes should be used in the paths. Currently, limited to 32 directory names.

    -n

    Instructs ResCompiler to check only the syntax. No binary resource files are created.

    -ooutfilename

    Specifies the output file name of the binary resource file. This option can only be used with a single input file or when reading from the stdin file. Only a single -o option is allowed per command line.

    -p

    Causes ResCompiler to pause until the Enter key is pressed if an error occurs. This is useful when invoking ResCompiler from the interpreter with an SCALL() function.

    -Uname

    Undefines a name. This happens after stdincl.h has been loaded but before the file is preprocessed.

    -v

    Displays the ResCompiler version and copyright information.

    -

    Indicates that the input file comes from stdin and is used in place of a file name.

Example

The following command starts ResCompiler and defines the DEBUG symbol for both the application.arc and support.arc files:

rescomp -DDEBUG application.arc -I/home/includes support.arc

After application.arc has been compiled, the /home/includes directory is added to the include file search path before the support.arc file is compiled.