IRC is the Windows version of the resource compiler. It accepts a resource script file (.rc) as input and produces a resource object file (.res) as output. IRC uses the following command line syntax:
irc [options] filename.rc
The following is a summary of IRC options. Note that options are not case-sensitive that is, -v is the same as -V.
| Option | Description |
|---|---|
| -dname[=string] | Defines a preprocessor symbol |
| -fofilename | Renames the output .res file. (By default, IRC creates the output .res file with the same name as the input .rc file.) |
| -ipath | Adds one or more directories (separated by semicolons) to the include search path. |
| -v | Prints progress messages (verbose) |
| -x | Deletes the current include path |
| -? or -h | Displays switch help |
| -kcodepage | Specifies the codepage to use. For example, irc -k085 mymess.rc The codepage to use is 085. |
IRC predefines common resource-related Windows constants, such as WS_VISIBLE and BS_PUSHBUTTON. Also, one special compiler-related symbol is defined: RC_INVOKED. This symbol can be used in the source text in conjunction with conditional preprocessor statements to control compilation. For example, the following construct can greatly speed up compilation:
#ifndef RC_INVOKED #include "windows.h" #endif
The following example adds two directories to the include path and produces a .res file with the same name as the input .rc file.
irc -idir1;dir2 filename.rc
The example produces an output .res file with a name different from the input .rc file name:
irc -fofilename.res filename.rc
![]()
Resource Compiler - An
Overview
![]()
Resource Compiler - An
Overview