### Resource Compiler - Syntax (OS/2)

Syntax

The RC command line has the following forms:

    rc [options] resource_script_file [executable_file]

    rc [options] resource_file [executable_file]

    rc [options] -r resource_script_file [resource_file]

Note: The last option does not add to the executable file.

where:

resource_script_file | The filename of the resource script file to be compiled. If the file is not in the current directory, you must provide a full path. If you provide a filename without specifying a filename extension, RC automatically appends the .RC extension to the name.
executable_file | The name of the executable file to receive the compiled resources. This is a file having a filename extension of either .EXE or .DLL. If the file is not in the current directory, you must provide a full path. If you omit the executable-file field, RC adds the compiled resources to the executable file that has the same name as the resource script file but which has the .EXE filename extension. If you specify the executable_file field but omit the filename extension, RC will append the .EXE extension. If this executable file does not exist, RC displays an error message.
-r | Directs RC to compile the resource script file without adding it to an executable file. You can use this option to prepare a binary resource file that you can add to an executable file at a later time. If you do not explicitly name a binary resource file along with the -r option, RC uses the same name as the resource script file but with the .RES filename extension.
resource_file | The name of the binary resource file to be added to the executable file. If the binary resource file does not already exist, RC creates it; otherwise, RC replaces the existing file. If the file is not in the current directory, you must provide a full path. The binary resource file must have the .RES filename extension.

Options
The following options can be specified on the Resource Compiler command line:

Option | Brief Description
--- | ---
-d <defname>[=<value>] | Define macro to preprocessor
-i <pathspec> | Include file path
-n | Suppress the display of the logo and the copyright information.
-r | Create .res file
-p | Pack - 386 resources will not cross 64K boundaries.
-cp (or -k) {<codepage>|<lbs,lbe>...} | DBCS code page or lead byte information
-x[ 1 | 2 ] | Exepack - compress resources, using method 1 or 2.
-cc <countrycode> | Country code
w2 | Suppress the display of all warning and informational messages. Errors and fatal errors continue to be displayed.
-h or -? | Access Help

Leave a blank after the letter when using option -cc, -d, -i, -cp or -k.

Under OS/2, upper- or lowercase letters can be used.

For a more detailed explanation of each option, please see the Explanation of Command-Line Options.

Resource Compiler - An Overview
Resource Compiler - Help
Resource Compiler - An Overview
Resource Compiler - Syntax