# Simple resource compiler interface`— eikrs.bat`

## Contents

- Purpose
- Command line syntax

### Purpose

The file `eikrs.bat` provides a convenient batch wrapper to invoke the C++ pre-processor and resource compiler, see Resource compiler. It provides the most commonly used resource compiler functionality. Some rarely needed options, such as the debugging option verbose output, are only available directly through `rcomp`.

`eikrs` generates two files:

- the `.rsc` resource data file. This file is the resource file that must be referred to at run-time by the application.
- the `.rsg` header file, which contains `#define` statements for each resource defined in the source file. This file can be `#include`d in C++ code, to provide a handle to each of the resources in the resource data file. For C++ and OPL development, see the respective SDKs for information on how to access the information within resource data files.

### Command line syntax

  `eikrs` source-filename language-variant [target-path]

For information about how to interpret the syntax, see BNF grammars.

##### Arguments

source-filename | specifies the name of the source file; `eikrs.bat` expects to find the source file source-filename`.rss` in the current directory.
language-variant | specifies a two letter code for the language variant.
target-path | optional but, if supplied, defines the target directory for the generated resource file. If this parameter is not supplied, the default target directory is `\epoc32\release\wins\deb\z\system\apps\`source-filename, if it exists; if this directory does not exist, the default target directory is `\epoc32\release\wins\deb\z\system\data`.

##### Output files

source-filename`.r` language-variant | The resource data referred to at run-time by the application. Note that the generated file extension is the character `r` followed by the two letter language-variant. Before the resource file can be used it must be renamed or copied to source-filename`.rsc`. See your SDK documentation for examples using this file.
source-filename`.rsg`, | the generated header file, which contains `#define` statements for each resource defined in the source file. This file is always placed into the directory `\epoc32\include`.

##### Notes

- As part of its processing, `eikrs.bat` checks whether the generated set of `#define` statements differs in any way from the set in the existing `.rsg` file. If there is no change, the `.rsg` file is not rebuilt. This avoids unnecessary re-compilation and re-linking.