RCC: Compiling Resources
rcc is the resource compiler used to compile the program's resources. rcc can generate either 16-bit or 32-bit resource files.
The Digital Mars linker actually binds the resources compiled with rcc to the executable. In contrast, Microsoft's resource compiler rc, both compiles the resources and binds them to the executable.
If building programs using the command line utilities, use either rc or rcc.
Note: rcc supports the VERSIONINFO structure in resource scripts. You can use this structure to label a version of an install program, for example.
rcc commands have the following format:
rcc infile [-ooutfile] [-n[emumfile]] {-D[macro[=text]]} {-(r u v x)[-]} {-wn[-]} {-Ipath} [-j[0 1 2]] {-32 [-lnnnn]}
Arguments | Description |
---|---|
infile | Source file |
-32 | Generate a 32-bit resource file |
-D | Predefines macro DEBUG to 1 |
-Dmacro | Predefines macro macro to 1 |
-Dmacro=text | Predefines macro macro to text |
-Ipath | Specify a search path for #included files |
-j[0 1 2] | Specify the format for two-byte Asian characters: 0=Japanese (default), 1=Chinese, 2=Korean |
-lnnnn | Specify the default language ID for Unicode conversions. nnnn is a hexadecimal number of the form 0xnnnn, nnnnh, or nnnn. Valid only if -32 is also specified |
-n | Generate enum output file |
-nenumfile | Generate enum output file enumfile |
-ooutfile | Specify an output file name |
-r[-] | For compatibility with Microsoft's RC resource compiler; this switch is ignored |
-u[-] | Disable [Enable] predefined macros |
-v[-] | Verbose [Silent] compilation mode |
-wn | Enable warning n |
-w-n | Disable warning n |
-x[-] | Turn off [on] limit on maximum number of errors |
rcc accepts the following #pragma directives:
Directive | Description |
---|---|
#pragma res32 | Generate a 32-bit resource file. This directive takes precedence over any conflicting command line switches. rcc must parse the pragma prior to parsing any resource type information; otherwise it generates an error if it encounters 16-bit resources, and ignores the directive otherwise. |
#pragma res16 | Generate a 16-bit resource file. This directive takes precedence over any conflicting command line switches. rcc must parse the pragma prior to parsing any resource type information; otherwise it generates an error if it encounters 16-bit resources, and ignores the directive otherwise. |
#pragma once | Parse the resource file where the directive appears only once, regardless of the number of times it is referenced. The compiler also supports this directive for #include'd files. |
rcc defines the following predefined macros:
Macro | Description |
---|---|
__INTSIZE | Set to 2 when generating a 16-bit resource file, or 4 when generating a 32-bit resource file. |
__NT__ | For compatibility with the compiler; defined when generating 32-bit resources. |
__RCC__ | Expands to the current version number for rcc. |
RC_INVOKED | Defined as 1. |