Use Resource Source Files as Sources for a Build

When you supply resource source files as source files for a build, the resource compiler runs automatically as a build extension during the build.

The best way to supply more than one resource source file is to combine them, using rcinclude resource compiler statements, into a single resource source file that you list in your configuration file. If you list more than one resource source file directly, the resource compiler build extension creates a temporary resource source file that includes your resource source files with rcinclude statements. However it does not check whether doing so will create problems such as conflicting macro definitions.

When you clean up the build environment by selecting Clean from the Project Workbook menu of the IDE, all temporary files created by the resource compiler build extension are deleted.

You can apply the following options to resource source files:

For example, the following excerpt from a configuration file builds a resource DLL from the resource source file mystuff.rc on Windows platforms. The option the -D with the value PLAIN is passed to the irc resource compiler.

target "mystuff.dll" {
   option res_rc_options( "-DPLAIN" ) {
      source "mystuff.rc"
   }
}

When used as a build extension, the resource compiler runs only once for each target that is built from resource source files. It runs only if the resource binary file does not exist or has an earlier timestamp than the resource source file. It will also run if any #include files are updated. The following files are created by the resource compiler:

On AIX, the irc tool creates a binary .res file.
On OS/2, the rc tool binds resources directly into the target creates no resource binaries
On Windows the irc tool creates binary .res and .rbj files.



Configuration Files
Build Extensions and Specification (.ice) Files


Add or Change Source Files
Make Message Files During a Build
Bind Message Files to the Executable Target of a Build
Compile Message Files During a Build
Compile and Bind Resources
Set Build Options
Build
Clean Up the Build Environment


Build Extensions Supplied with VisualAge C++