The Resource Compiler (RC) compiles a resource script file to create a new file called a binary resource file.
The binary resource file can be added to the executable file of the application, replacing any existing resources in that file.
You can start RC in any of three ways.
The RC command line has the following three basic forms:
rc16 resource-script-file [executable-file] rc16 resource-file [executable-file] rc16 -r resource-script-file [resource-file]
Note: The third option does not add to the executable file.
The resource-script-file field must be the file name 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 file name without specifying an extension, RC automatically appends the .RC extension to the name.
The executable-file field must be the name of the executable file to receive the compiled resources. This is a file having an 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 file extension. If you specify the executable-file field but omit the extension, RC will append the .EXE extension. If this executable file does not exist, RC displays an error message.
The -r option 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 extension.
The resource-file field must be 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 extension.
For example, to compile the resource script file EXAMPLE.RC, and add the result to the executable file EXAMPLE.EXE, use the following command:
rc16 example
You do not need to specify the .RC extension. RC creates the binary resource file EXAMPLE.RES and adds the compiled resource to the executable file EXAMPLE.EXE.
To compile the resource script file EXAMPLE.RC into a binary resource file without adding the resources to an executable file, use the following command:
rc16 -r example
The compiler creates the binary resource file EXAMPLE.RES. To create a binary resource file that has a name different from the resource script file, use the following command:
rc16 -r example newfile.res
To add the compiled resources in the binary resource file EXAMPLE.RES to an executable file, use the following command:
rc16 example.res
To specify the name of the executable file, if the name is different from the resource file, use the following command:
rc16 example.res newfile.exe
To add the compiled resources to a dynamic-link-library (.DLL) file, use the following command:
rc16 example.res dynalink.dll