Resource Compiler Command Line

To start RC, use the following command-line syntax:

RC [options] script-file

The script-file argument specifies the name of the resource-definition script that contains the names, types, filenames, and descriptions of the resources to be compiled.

The options argument can include one or more of the following options:

Option Description
/? Displays a list of RC command-line options.
/d Defines a symbol for the preprocessor that you can test with #ifdef.
/fo resname Uses resname for the name of the .RES file.
/h Displays a list of RC command-line options.
/i directory Causes RC to search the specified directory before searching the directories specified by the INCLUDE environment variable.
/lcodepage Specifies default language for compilation. For example, -l409 is equivalent to including the following statement at the top of the resource script file:
LANGUAGE LANG_ENGLISH,SUBLANG_ENGLISH_US 

Alternatively, you use #pragma code_page(409) in the .RC file.

/n Null terminates all strings in the string table.
/r Ignored. Provided for compatibility with existing makefiles.
/u Undefines a symbol.
/v Causes a display of messages that report on the progress of the compiler.
/x Prevents RC from checking the INCLUDE environment variable when searching for header files or resource files.

Options are not case sensitive and a dash (-) can be used in place of a forward slash (/). You can combine single-letter options if they do not require additional arguments. For example, the following commands are equivalent:

  RC /V /X SAMPLE.RC
  rc -vx sample.rc

For more information on these options and the resource compiler, see the online Platform SDK sections under "Windows Programming Guidelines" and "Platform SDK Tools," such as "Using the Resource Compiler."