Copyright: Copyright © 1996 Sybase, Inc. and its subsidiaries. All rights reserved.   Monday, October 01, 2001 13:36:16


Index of Topics

- 1 -

10 "<file>" is not a valid bitmap file.

11 Trying to add a Windows RES file "<file>" to an NT executable "<file>".

12 Trying to add an NT RES file "<file>" to a Windows executable "<file>".

13 Object alignment increase required.  Relink with larger object alignment.

14 EXE contained old resources that could not be removed.

15 Error reading EXE file "<file>":  <reason>.

16 Error reading file "<file>":  Unexpected end of file.

17 Error writing to "<file>":  <reason>.

18 Error reading icon file "<file>":  <reason>.

19 Error reading cursor file "<file>":  <reason>.

- 2 -

20 Error reading bitmap file "<file>":  <reason>.

21 Error reading font file "<file>":  <reason>.

22 Error reading data file "<file>":  <reason>.

23 Error reading RES file "<file>":  <reason>.

24 Error reading temporary file "<file>":  <reason>.

25 Error writing to temporary file "<file>":  <reason>.

26 Unable to open temporary file "<file>":  <reason>.

27 Error reading from file "<file>":  <reason>.

28 Unable to read RES file "<file>":  wrong version.

29 "<file>" is not a valid RES file.

- 3 -

30 Internal compiler error <internal_error_num>.

31 Error writing resources to temporary file "<file>":  <resource>.

32 Error while closing file "<file>" or flushing buffers to it:  <reason>.

33 Error while closing temporary file "<file>" or flushing buffers to it:  <reason>.

35 RCINCLUDE keyword not currently supported.  Use #include.

36 '<src_char>' is not valid at this point.

37 String may not cross newline boundary.

38 Expecting '<expected_str>' but found '<src_char>'

39 Too many arguments:  <extra_name>

- 4 -

40 Filename required on command line.

41 Unknown option '<option>'

42 No options specified after options character.

43 Out of memory

44 No type given for accelerator <source_num>

45 Keyword <accel_type> ignored for type ASCII accelerator <source_num>

46 Duplicate resource:  <resource_name>

47 Internal parser error.

49 Syntax error near "<src_str>"

- 5 -

50 <source_num> is a duplicate string identifier.

51 Raw data item <source_num> is too big.  Max <max_num>

52 Raw data item <source_num> is too small.  Min <max_num>

53 Font name must be a number.

54 Can't #include more than <max_num> levels.

55 Unknown preprocessor directive

56 Invalid #line directive

57 Unknown option '<option>'

58 "<file>" is not a valid EXE file.

59 Unable to produce fastload section.

- 6 -

6 Unable to open file "<file>":  <reason>.

60 Can't find file "<file>".

61 Unknown target OS:  '<os>'

62 <preproc_msg>

63 Keyword "<keyword>" is only valid for Windows NT.

64 Keyword "<keyword>" not currently being supported.

65 Resource strings not found.

66 Error can't find character translation file "<file>".

67 Error opening character translation file "<file>":  <reason>.

68 Error reading character translation file "<file>":  <reason>.

69 "<file>" is not a valid character translation file.

- 7 -

7 Error renaming temporary file "<file>" to "<file>":  <reason>

70 Unable to read character translation file "<file>":  wrong version.

71 Option '<option>' not valid for an NT .RES file.

72 L"..." construct is not valid for Windows.

73 Options '<option>' and '<option>' may not be specified together.

74 Environment variable '<var>' is not set.

76 MENUITEM must have ID value.

77 Id/Type/State/HelpId not allowed for MENU POPUP controls.

78 MENUITEM options are not allowed for MENUEX POPUP controls.

79 Type/State not valid for MENU MENUITEM controls.

- 8 -

8 "<file>" is not a valid icon file.

80 MENUITEM options not valid for MENUEX MENUITEM controls.

81 HELPID not valid for DIALOG.

82 Font Italic setting not allowed for DIALOG.

83 Font Weight setting not allowed for DIALOG.

84 HELPID not valid for DIALOG controls.

85 Data Elements not valid for DIALOG controls.

86 <value> is not a valid resource id.

87 User interrupt detected.

88 Resource type for resource "<resource>" is greater than 32767.

89 Resource ID "<id>" is greater than 32767.

- 9 -

9 "<file>" is not a valid cursor file.

90 Unmatched quotation mark on command line.

- R -

Resource Compiler Options

Resource Definition Files

- S -

Sample .RC file

- U -

Using the Watcom Resource Compiler

- W -

Warning and Error Messages

The Watcom Resource Compiler


Table of Contents

The Watcom Resource Compiler

Resource Definition Files

Sample .RC file

Resource Compiler Options

Using the Watcom Resource Compiler

Warning and Error Messages

6 Unable to open file "<file>":  <reason>.

7 Error renaming temporary file "<file>" to "<file>":  <reason>

8 "<file>" is not a valid icon file.

9 "<file>" is not a valid cursor file.

10 "<file>" is not a valid bitmap file.

11 Trying to add a Windows RES file "<file>" to an NT executable "<file>".

12 Trying to add an NT RES file "<file>" to a Windows executable "<file>".

13 Object alignment increase required.  Relink with larger object alignment.

14 EXE contained old resources that could not be removed.

15 Error reading EXE file "<file>":  <reason>.

16 Error reading file "<file>":  Unexpected end of file.

17 Error writing to "<file>":  <reason>.

18 Error reading icon file "<file>":  <reason>.

19 Error reading cursor file "<file>":  <reason>.

20 Error reading bitmap file "<file>":  <reason>.

21 Error reading font file "<file>":  <reason>.

22 Error reading data file "<file>":  <reason>.

23 Error reading RES file "<file>":  <reason>.

24 Error reading temporary file "<file>":  <reason>.

25 Error writing to temporary file "<file>":  <reason>.

26 Unable to open temporary file "<file>":  <reason>.

27 Error reading from file "<file>":  <reason>.

28 Unable to read RES file "<file>":  wrong version.

29 "<file>" is not a valid RES file.

30 Internal compiler error <internal_error_num>.

31 Error writing resources to temporary file "<file>":  <resource>.

32 Error while closing file "<file>" or flushing buffers to it:  <reason>.

33 Error while closing temporary file "<file>" or flushing buffers to it:  <reason>.

35 RCINCLUDE keyword not currently supported.  Use #include.

36 '<src_char>' is not valid at this point.

37 String may not cross newline boundary.

38 Expecting '<expected_str>' but found '<src_char>'

39 Too many arguments:  <extra_name>

40 Filename required on command line.

41 Unknown option '<option>'

42 No options specified after options character.

43 Out of memory

44 No type given for accelerator <source_num>

45 Keyword <accel_type> ignored for type ASCII accelerator <source_num>

46 Duplicate resource:  <resource_name>

47 Internal parser error.

49 Syntax error near "<src_str>"

50 <source_num> is a duplicate string identifier.

51 Raw data item <source_num> is too big.  Max <max_num>

52 Raw data item <source_num> is too small.  Min <max_num>

53 Font name must be a number.

54 Can't #include more than <max_num> levels.

55 Unknown preprocessor directive

56 Invalid #line directive

57 Unknown option '<option>'

58 "<file>" is not a valid EXE file.

59 Unable to produce fastload section.

60 Can't find file "<file>".

61 Unknown target OS:  '<os>'

62 <preproc_msg>

63 Keyword "<keyword>" is only valid for Windows NT.

64 Keyword "<keyword>" not currently being supported.

65 Resource strings not found.

66 Error can't find character translation file "<file>".

67 Error opening character translation file "<file>":  <reason>.

68 Error reading character translation file "<file>":  <reason>.

69 "<file>" is not a valid character translation file.

70 Unable to read character translation file "<file>":  wrong version.

71 Option '<option>' not valid for an NT .RES file.

72 L"..." construct is not valid for Windows.

73 Options '<option>' and '<option>' may not be specified together.

74 Environment variable '<var>' is not set.

76 MENUITEM must have ID value.

77 Id/Type/State/HelpId not allowed for MENU POPUP controls.

78 MENUITEM options are not allowed for MENUEX POPUP controls.

79 Type/State not valid for MENU MENUITEM controls.

80 MENUITEM options not valid for MENUEX MENUITEM controls.

81 HELPID not valid for DIALOG.

82 Font Italic setting not allowed for DIALOG.

83 Font Weight setting not allowed for DIALOG.

84 HELPID not valid for DIALOG controls.

85 Data Elements not valid for DIALOG controls.

86 <value> is not a valid resource id.

87 User interrupt detected.

88 Resource type for resource "<resource>" is greater than 32767.

89 Resource ID "<id>" is greater than 32767.

90 Unmatched quotation mark on command line.


The Watcom Resource Compiler

The Watcom Resource Compiler (WRC) performs two functions.  It converts human readable resource script files (usually with the extension ".RC") into machine readable resource files (usually with the extension ".RES").  We call this process pass one.  The Watcom Resource Compiler then combines this ".RES" file with an existing executable file or dynamic link library.  We call this process pass two.  Pass two may also be run without a ".RES" file to set flags or to produce a fastload section.

The Watcom Resource Compiler can process resources for the Windows and Windows NT operating systems.

The Watcom Resource Compiler command line syntax is the following.

     WRC {options} input-filename {options} [output-filename] {options}

The square brackets [ ] denote items which are optional.

WRC

is the name of the Watcom Resource Compiler.

input-filename

The filename specification of the resource file to compile.

If no extension is specified for input-filename, then the extension "rc" is assumed.  If the period (.) is specified but not the extension, the file is assumed to have no file extension.

output-filename

The filename specification for the output of the compilation.

The meaning of this filename and its default extension is dependent on the actions being performed.  See the section entitled Using the Watcom Resource Compiler for information on this.

options

A list of valid options, each preceded by a slash (/) or a dash (-).

Options may be specified in any order.

/?

print this help summary

/q

operate quietly

/30

mark file as requiring Windows 3.0

/31

mark file as requiring Windows 3.1 (default)

/dNAME=value

behave as if #define NAME value was at top of file

/ad

generate auto dependency information for use by the Watcom Make utility

/bt=<target>

build target is one of the following:

windows

build a WIN16 resource file (default for the non-NT hosted resource compiler)

nt

build a WIN32 resource file (default for the Windows NT-hosted or Windows 95-hosted resource compiler)

/c=name

set the code page conversion file

/e

for a DLL, global memory above EMS line

/fe=name

set the output EXE file to name

/fo=name

set the output RES file to name

/fr=name

specify an additional input RES file.

/i=path

look in path for include files

/k

don't sort segments (same as /s0)

/l

program uses LIM 3.2 EMS directly

/m

each instance of program has its own EMS bank

/p

private DLL

/r

only build the RES file

/s{0,1,2}

segment and resource sorting method:

0:

no sorting, leave segments in the linker order

1:

move preload segments to front and mark for fast load if possible

2:

(default) move preload, data, and non-discardable segments to front and mark for fast load if possible

/t

protected mode only

/v

verbose:  print tokens as they are scanned

/v1

verbose:  print grammar rules as they are reduced

/v2

verbose:  print both tokens and grammar rules

/x

ignore the INCLUDE environment variable

/zk{0,1,2}

double-byte character support:

0:

(default) Kanji

1:

Chinese/Taiwanese (for Windows only)

2:

Korean (for Windows only)

/zm

output Microsoft format .RES files

/zn

don't preprocess the file


Resource Definition Files

A resource definition file (".RC" file) lists all resources that your application will use.  You should refer to your Windows or Windows NT programmer's documentation for information on the script language used in resource definition files.


Sample .RC file

The following example is the resource script file from an application called Life:

Example:

     #include "windows.h"

     #include "life.h"

     ABOUTBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 7, 15,

     147, 87

         CAPTION "About Life"

         STYLE WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_SYSMENU |

                     DS_MODALFRAME | WS_POPUP

         BEGIN

             CONTROL "Watcom Life Program for Windows", -1, "static",

                     SS_CENTER | WS_GROUP | WS_CHILD, 0, 5, 144, 8

             CONTROL "Version 1.0", -1, "static", SS_CENTER | WS_GROUP

                     | WS_CHILD, 0, 14, 144, 8

             CONTROL "OK", 1, "button", BS_DEFPUSHBUTTON | WS_GROUP

                     | WS_TABSTOP | WS_CHILD, 55, 64, 32, 14

             CONTROL "LifeIcon", -1, "static", SS_ICON | WS_CHILD,

                     58, 28, 27, 22

         END

     CellBitMap BITMAP cell.bmp

     MenuBitMap BITMAP menu.bmp

     LifeIcon ICON life.ico

     LifeMenu MENU

         BEGIN

             POPUP "&File"

                 BEGIN

                     MENUITEM "&Save Selected Region ...", MENU_SAVE

                     MENUITEM "&Load New Pattern ...", MENU_LOAD

                     MENUITEM SEPARATOR

                     MENUITEM "&About Life ...", MENU_ABOUT

                 END

             POPUP "&Boundary"

                 BEGIN

                     MENUITEM "&Wrap Around", MENU_WRAP_AROUND

                     MENUITEM "&Bounded Edges", MENU_BOUNDED_EDGES

                 END

         END

The two #include statements for .H files are used to include definitions necessary to compile the resource file.  The WINDOWS.H header file contains general definitions for Windows, and the LIFE.H header file contains definitions specific to the LIFE application.

The DIALOG statement defines the "ABOUT" dialog box used by the LIFE application.

The two BITMAP statements define a pair of bitmap resources found in the files CELL.BMP and MENU.BMP.  The bitmaps are identified by the names CellBitMap and MenuBitMap respectively.

The ICON statement defines an icon resource found in the file LIFE.ICO.  The icon is identified by the name LifeIcon.

The MENU statement defines the various menu items that are in the menu, and what identifiers are sent to the application when the menu item is selected.


Resource Compiler Options

/?

Displays a summary of Watcom Resource Compiler command line options.

/q

Causes the Watcom Resource Compiler to operate quietly.  No text is displayed as the Watcom Resource Compiler runs except for warning and error messages.

/30

Marks the executable file as being able to run on Windows 3.0 or Windows 3.1.  By default, WRC marks the executable file as able to run on Windows 3.1 only.  This option affects pass two only.

/31

Marks the executable file as being able to run on Windows 3.1 only.  This is the default setting.  This option affects pass two only.

/ad

Allows the use of the WMAKE .AUTODEPEND directive with your .RES files.  If you do the first and second passes separately and use this option, you should specify it for both passes.  This options may not be used with the -zm switch.

/dNAME=value

Defines a macro NAME.  This is the same as adding the line

     #define NAME    value

to the top of your resouce script file.  If value is not specified then a compiler generated value is provided.  This option affects pass one only.

/bt=<target>

This is the build target directive.  It is used to specify whether you are building a resource file for Windows or Windows NT.  The target may be one of the following:

windows

build a WIN16 (Windows) resource file (default for the non-NT hosted resource compiler)

nt

build a WIN32 (Windows NT) resource file (default for the NT hosted resource compiler)

This option affects pass one only.  During pass two the target is inferred from the format of the input files.

/e

Specifies that global memory is above the EMS line in a Windows 3.0 DLL.  This option has no effect with Windows 3.1 or Windows NT.  This option affects pass two only.

/fe=name

Specifies a new name for the resulting executable file after the resources are added to the executable.

/fo=name

Specifies the name of the output resource file (default is the name of the .RC file with a .RES extension).  The option affects pass one only.

/fr=name

Specifies the name of an additional input resource file.  The option affects pass one only.  This option may be specified multiple times.

/i=path

Specifies an include path.  This include path is searched before the directories specified in the INCLUDE environment variable.  This option affects pass one only.

/k

Disables the segment sorting feature (load optimization).  If this option is not specified, the Watcom Resource Compiler arranges all pre-load segments and resources so that they are at the start of the executable.  This option has no effect with Windows NT.  This option affects pass two only.

/l

Mark the application as using LIM 3.2 EMS directly.  This option has no effect with Windows 3.1 or Windows NT.  This option affects pass two only.

/m

Each instance of the application has its own EMS bank, when Windows is running with EMS 4.0 (by default, all instances share the same EMS bank).  This option has no effect with Windows 3.1 or Windows NT.  This option affects pass two only.

/p

Mark a dynamic link library as a private DLL that is called by only one application.  This option has no effect with Windows 3.1 or Windows NT.  This option affects pass two only.

/r

Only build the .RES file.  This option is used when you do not want to add the compiled resources to the executable file.  It prevents pass two from being performed.

/s{0,1,2}

Specifies the segment and resource sorting method.  Possible settings are:

0:

No sorting, leave segments in the linker order.

1:

Move preload segments to front and mark for fast load if possible.

2:

Move preload, data, and non-discardable segments to front and mark for fast load if possible (the default).

This option has no effect with Windows NT.  This option affects pass two only.

/t

Marks the application as able to run in a protected-mode Windows environment (standard mode or enhanced mode) only.  This option has no effect with Windows 3.1 or Windows NT.  This option affects pass two only.

/v

This is a debugging option.  It causes WRC to print tokens as they are scanned during pass one.

/v1

This is a debugging option.  It causes WRC to print grammar rules as they are reduced during pass one.

/v2

This is a debugging option.  It causes WRC to print both tokens and grammar rules while pass one is performed.

/x

This option causes WRC to ignore the INCLUDE environment variable.  Normally, the Watcom Resource Compiler searches the directories specified in the INCLUDE environment variable for files specified in a #include directive in the .RC file.  This option affects pass one only.

/zk{0,1,2}

Strings contained in resources in the .RC file are assumed to contain double byte characters from the appropriate character sets.  Although these options allow strings to contain double byte characters the names of resources in the resource script file must contain only standard ASCII characters in the range 0-127 (inclusive).  This option affects pass one only.  Possible settings are:

0:

(default) Kanji

1:

Chinese/Taiwanese (for Windows only)

2:

Korean (for Windows only)

/zm

This option causes WRC to output a Microsoft format .RES file.  This is useful when using a dialog editor or other resource tool that understands Microsoft .RES files.  This option affects pass one only.  This option may not be specified when creating a .RES file for NT (i.e., when the -bt=NT switch has been specified).

/zn

WRC will not pre-process the .RC file if this option is specified.  This option affects pass one only.


Using the Watcom Resource Compiler

The command WRC is used to start the Watcom Resource Compiler.  The Watcom Resource Compiler may be used in a number of different ways:

•	To compile a resource definition file and add the resulting resources to the executable.

WRC is used as follows to accomplish this:

     wrc [options] resource-definition-file [executable-file]

The resource-definition-file must not have the extension ".RES", ".EXE", ".SCR", ".DLL" or ".DRV".  If no extension is specified for the executable-file then ".EXE" is assumed.  If executable-file is specified without an extension but is terminated with a period (".") then the default extension is not added.  If the executable-file is not specified then its value defaults to the filename specified for the resource-definition-file with its extension changed to ".EXE".

Example:

     wrc life.rc

•	To compile resources separately.

This causes the Watcom Resource Compiler to create a .RES file only.  WRC is used as follows to accomplish this:

     wrc -r [options] resource-definition-file [output-file]

The resource-definition-file must not have the extension ".RES", ".EXE", ".SCR", ".DLL" or ".DRV".  If no extension is specified for the output-file then ".RES" is assumed.  If output-file is specified without an extension but is terminated with a period (".") then the default extension is not added.  If the output-file is not specified then its value defaults to the filename specified for the resource-definition-file with its extension changed to ".RES".

Example:

     wrc -r -bt=NT life.rc

•	To add a compiled resource file to an executable file.

WRC is used as follows to accomplish this:

     wrc [options] resource-file [executable-file]

The resource-file must have the extension ".RES".  The defaults for the executable-file parameter are the same as in the case of compiling a resource definition file and adding the results to an executable.

Example:

     wrc life.res

•	To add multiple compiled resource files to an executable file.

WRC is used as follows to accomplish this:

     wrc [options] res-file [executable-file] -fr=res-file-2 ...

The resource files must have the extension ".RES".  The defaults for the executable-file parameter are the same as in the case of compiling a resource definition file and adding the results to an executable.

Example:

     wrc life.res life.exe -fr wave.res

•	To compile an application that does not have a resource file.

This is useful if you wish to set the Windows or Windows NT version number, or sort load the segments (Windows), or use any of the other executable modifying features of Watcom Resource Compiler.  WRC is used as follows to accomplish this:

     wrc [options] executable-file

The file specified for executable-file specified must have a ".EXE", ".SCR", ".DLL" or ".DRV" extension.

Example:

     wrc -30 life.exe


Warning and Error Messages

This section describes the various warning and error messages that may be issued by the Watcom Resource Compiler.

Read Errors

Messages concerning "read errors" indicate than an error occurred while the Watcom Resource Compiler was reading the specified file.  The reason, if present, indicates the type of error.  The message may indicate the type of file that was being read, such as a bitmap or icon.  If the message says 'temporary file' then the file is one created by the Watcom Resource Compiler for use while it is running.  This is not a file specified by the user.

Write Errors

Messages concerning "write errors" indicate than an error occurred while the Watcom Resource Compiler was writing to the specified file.  The reason, if present, indicates the type of error.  The message may indicate the type of file that was being written, such as a bitmap or icon.  If the message says "temporary file" then the file is one created by the Watcom Resource Compiler for use while it is running.  This is not a file specified by the user.


6 Unable to open file "<file>":  <reason>.

The Watcom Resource Compiler was unable to open the specified file for the specified reason.


7 Error renaming temporary file "<file>" to "<file>":  <reason>

When creating an executable or resource file the Watcom Resource Compiler first writes the information to a temporary file then renames that file.  This messages indicates that an error occurred while renaming the specified temporary file.


8 "<file>" is not a valid icon file.

The file specified in an ICON statement is either not a valid icon file or is corrupted.  You can do two things:

•	Try recreating the file

•	Make sure the correct file is specified


9 "<file>" is not a valid cursor file.

The file specified in a CURSOR statement is either not a valid cursor file or is corrupted.  You can do two things:

•	Try recreating the file

•	Make sure the correct file is specified


10 "<file>" is not a valid bitmap file.

The file specified in a BITMAP statement is either not a valid bitmap file or is a corrupted.  You can do two things:

•	Try recreating the file

•	Make sure the correct file is specified


11 Trying to add a Windows RES file "<file>" to an NT executable "<file>".

This error occurs when you attempt to run pass two of the Watcom Resource Compiler with a Windows .RES file and an NT executable file.  You can do two things:

•	Recreate the .RES file using the -bt=NT switch

•	Make sure the correct file is specified.


12 Trying to add an NT RES file "<file>" to a Windows executable "<file>".

This error occurs when you attempt to run pass two of the Watcom Resource Compiler with an NT .RES file and a Windows executable file.  You can do two things:

•	Recreate the .RES file using the -bt=Windows switch

•	Make sure the correct file is specified.


13 Object alignment increase required.  Relink with larger object alignment.

Each NT EXE file contains an object alignment value that determines the maximum size of the file.  This error indicates that in adding resources to an NT executable, the size of the EXE increased enough that its object alignment must be increased.  The solution is to re-link the EXE file with a larger object alignment.  (Refer to the Watcom Linker OBJALIGN option) then run the Watcom Resource Compiler again.


14 EXE contained old resources that could not be removed.

The NT EXE that the Watcom Resource Compiler is operating on already contains resources that the compiler cannot remove.  As a result, the produced executable will be larger than it needs to be but it will still work.  The recommended solution is to relink the EXE and run the Watcom Resource Compiler again.  This is a warning only.


15 Error reading EXE file "<file>":  <reason>.

Refer to the notes on Read Errors at the start of this section.


16 Error reading file "<file>":  Unexpected end of file.

Refer to the notes on Read Errors at the start of this section.

This message probably indicates that the given file is corrupt.  Try regenerating the file.


17 Error writing to "<file>":  <reason>.

Refer to the notes on Write Errors at the start of this section.


18 Error reading icon file "<file>":  <reason>.

Refer to the notes on Read Errors at the start of this section.


19 Error reading cursor file "<file>":  <reason>.

Refer to the notes on Read Errors at the start of this section.


20 Error reading bitmap file "<file>":  <reason>.

Refer to the notes on Read Errors at the start of this section.


21 Error reading font file "<file>":  <reason>.

Refer to the notes on Read Errors at the start of this section.


22 Error reading data file "<file>":  <reason>.

Refer to the notes on Read Errors at the start of this section.


23 Error reading RES file "<file>":  <reason>.

Refer to the notes on Read Errors at the start of this section.


24 Error reading temporary file "<file>":  <reason>.

Refer to the notes on Read Errors at the start of this section.


25 Error writing to temporary file "<file>":  <reason>.

Refer to the notes on Write Errors at the start of this section.


26 Unable to open temporary file "<file>":  <reason>.

The Watcom Resource Compiler is unable to create a temporary file that is needed to perform the specified task.  The reason gives an explanation of why the operation failed.


27 Error reading from file "<file>":  <reason>.

Refer to the notes on Read Errors at the start of this section.


28 Unable to read RES file "<file>":  wrong version.

The Watcom Resource Compiler is unable to read the specified .RES file because its version is incompatible with this version of the compiler.  The solution is to recreate the .RES file using this version of the Watcom Resource Compiler


29 "<file>" is not a valid RES file.

This error occurs if the specified file is not a valid RES file.  You can do two things:

•	Regenerate the .RES file.

•	Make sure the correct file is specified.


30 Internal compiler error <internal_error_num>.

This message indicates that an unexpected error occurred within the Watcom Resource Compiler .  Report any occurrence of this message to Watcom Technical Support.


31 Error writing resources to temporary file "<file>":  <resource>.

Refer to the notes on Write Errors at the start of this section.


32 Error while closing file "<file>" or flushing buffers to it:  <reason>.

This indicates an error occurred while closing or writing to the given file.


33 Error while closing temporary file "<file>" or flushing buffers to it:  <reason>.

This indicates an error occurred while closing or writing to the given file.  The given file was a temporary file created by the Watcom Resource Compiler for its use while it is running.


35 RCINCLUDE keyword not currently supported.  Use #include.

This message indicates the rcinclude keyword was used and it is not supported.  The solution is to convert rcinclude statements to #include statements in the following manner:  convert RCINCLUDE foo.h to #include "foo.h"


36 '<src_char>' is not valid at this point.

This message indicates that a syntactic error occurred while parsing a resource script file.


37 String may not cross newline boundary.

While compiling a .RC file a string literal was encountered that did not have a closing quotation before the end of the line it was on.  For example,

     "this string

would cause the error, while

     "this one would not"


38 Expecting '<expected_str>' but found '<src_char>'

This message indicates that a syntactic error occurred while parsing a resource script file.


39 Too many arguments:  <extra_name>

This error occurs when more than two filenames are specified on the command line.


40 Filename required on command line.

This message indicates that no filename was specified on the command line.


41 Unknown option '<option>'

This error occurs when the stated option is specified on the command line but is not a valid Watcom Resource Compiler option.


42 No options specified after options character.

This error occurs when the character / or - is specified on the command line with no option specified after it.


43 Out of memory

The Watcom Resource Compiler does not have enough memory to complete the requested operation.


44 No type given for accelerator <source_num>

This error is reported when the Watcom Resource Compiler encounters a definition for a character or virtual-key accelerator that lacks a type.


45 Keyword <accel_type> ignored for type ASCII accelerator <source_num>

This error occurs when the keyword specified by <accel_type> is specified for an ASCII accelerator.  This keyword is not valid for ASCII accelerators and will be ignored.


46 Duplicate resource:  <resource_name>

This error occurs when more than one resource with the same name, type, and language is encountered in a .RC file.  Only the first resource encountered is properly included in the .RES file.  This is a warning only.


47 Internal parser error.

This indicates that a syntactic error occurred while parsing a resource script file.


49 Syntax error near "<src_str>"

This indicates that a syntactic error occurred while parsing a resource script file.


50 <source_num> is a duplicate string identifier.

This message indicates that more than one string table string is defined with the given numeric identifier.  Numeric identifiers for strings in string tables must be unique.


51 Raw data item <source_num> is too big.  Max <max_num>

This message indicates that the given value is specified as an element of an RCDATA resource and is greater than the largest allowable value for an RCDATA resource element.


52 Raw data item <source_num> is too small.  Min <max_num>

This message indicates that the given value is specified as an element of an RCDATA resource and is less than the least allowable value for an RCDATA resource element.


53 Font name must be a number.

This error occurs when an ASCII string is used as a name for a FONT resource.  Font resource names must be numeric.


54 Can't #include more than <max_num> levels.

There is a limit on the number of levels deep you can nest #include statements.  <max_num> specifies the maximum number of levels of nesting allowed.  This message occurs when a file contains more levels of nesting than are allowed.


55 Unknown preprocessor directive

This error occurs when a command that is not a valid preprocessor directive is prefixed by a #.


56 Invalid #line directive

This error is reported when a #line directive is encountered in a resource script file but the parameters after it are not valid.


57 Unknown option '<option>'

This error is reported when a command line option is specified that the Watcom Resource Compiler does not understand.


58 "<file>" is not a valid EXE file.

This error occurs when the Watcom Resource Compiler expects the given file to be an EXE file but it is either not an EXE file or it is a corrupted EXE file.  You can do two things:

•	Make sure the correct file is specified.

•	Regenerate the EXE file by relinking.


59 Unable to produce fastload section.

This error occurs when the Watcom Resource Compiler is unable to create a fastload section in the given EXE because one of the segments in the EXE is larger than 64K.  This message is only a warning; a working executable including resources is still produced.  This message does not appear if the -k option is used.


60 Can't find file "<file>".

This message indicates that the Watcom Resource Compiler is unable to locate an input file needed to complete the operation.  This file may be one of the files specified on the command line or one included in the .RC file by a statement such as ICON, BITMAP, RCDATA, or CURSOR.  You can do two things:

•	For files specified on the command line, make sure the file was specified correctly and that it exists in the current directory or in the specified directory if a path for it is given on the command line.

•	For files included by a .RC file statement, make sure the file is specified correctly and exists in the current directory or a directory specified by the INCLUDE environment variable.


61 Unknown target OS:  '<os>'

This message indicates that on the Watcom Resource Compiler command line the -bt=<os> option is specified and the compiler does not recognize the specified <os>.  The valid values for <os> are Windows and NT.


62 <preproc_msg>

This indicates an error occurred while preprocessing a .RC file.  The text of the message contains information about the error.


63 Keyword "<keyword>" is only valid for Windows NT.

While creating a non-NT .RES file, the Watcom Resource Compiler encountered a keyword that is only valid for NT.


64 Keyword "<keyword>" not currently being supported.

A keyword was used in a .RC file that is not supported by the Watcom Resource Compiler


65 Resource strings not found.

This message indicates that your copy of the Watcom Resource Compiler has been corrupted.  Try reinstalling the compiler from your original installation disks.  If this fails, report the problem to Watcom Technical Support.


66 Error can't find character translation file "<file>".

Character translation files are data files that the Watcom Resource Compiler uses when creating an NT .RES file to convert text into UNICODE.  This message indicates that the Watcom Resource Compiler cannot locate the given translation file that it requires.  The solution is to find the file and make sure it is in your path.


67 Error opening character translation file "<file>":  <reason>.

Character translation files are data files that the Watcom Resource Compiler uses when creating an NT .RES file to convert text into UNICODE.  This message indicates that the Watcom Resource Compiler found the character translation file but was unable to access it for the given reason.


68 Error reading character translation file "<file>":  <reason>.

Refer to the notes on Read Errors at the start of this section.


69 "<file>" is not a valid character translation file.

Character translation files are data files that the Watcom Resource Compiler uses when creating an NT .RES file to convert text into UNICODE.  This error occurs when the Watcom Resource Compiler finds a file with the same name as the expected character translation file but this file is either not a character translation file or is a corrupted character translation file.  You can do two things:

•	Find the correct character translation file (the one that came with this version of the Watcom Resource Compiler) and put it in a directory that appears in your path before any other directory that contains a file of that name.

•	Try reinstalling the file from your original distribution disks.


70 Unable to read character translation file "<file>":  wrong version.

Character translation files are data files that the Watcom Resource Compiler uses when creating an NT .RES file to convert text into UNICODE.  This error occurs when the Watcom Resource Compiler finds a file with the same name as the expected character translation file but is unable to read it because its version is incompatible with this version of the compiler.  You can do two things:

•	Find the correct character translation file (the one that came with this version of the Watcom Resource Compiler) and put it in a directory that appears in your path before any other directory that contains a file of that name.

•	Try reinstalling the file from your original distribution disks.


71 Option '<option>' not valid for an NT .RES file.

This indicates that while producing an NT .RES file, a command line parameter was specified that is not valid for NT .RES files.


72 L"..." construct is not valid for Windows.

This error occurs when the user enters a string prefixed by the letter (i.e.  L"Bob") in an .RC file being turned into a Windows .RES file.  The L specifier is meaningless for Windows and will be ignored.  This is a warning only.


73 Options '<option>' and '<option>' may not be specified together.

This error occurs when two options specified on the command line are not compatible with one another.  You should remove one of the specified options.


74 Environment variable '<var>' is not set.

An environment variable specified on the command line using the @ option had no value set for it.


76 MENUITEM must have ID value.

A MENUITEM in a MENU resource must contain a menu id.  This message is issued when a MENUITEM in a menu resource does not have a menu id specified for it.

Example:

     mymenu MENU

     BEGIN

         MENUITEM "my item"

     END

Menu items in menuex resources do not need a menu id.


77 Id/Type/State/HelpId not allowed for MENU POPUP controls.

A POPUP statement in a MENU resource may not be followed by any modifiers (such as an ID).  This message is issued when a POPUP statement in a MENU resource is followed by one or more modifiers.

Example:

     mymenu MENU

     BEGIN

         POPUP "my popup", MY_ID

     END

POPUP statements in menuex resources may be followed by modifiers.


78 MENUITEM options are not allowed for MENUEX POPUP controls.

A POPUP statement in a MENUEX resource may not use optional modifiers such as CHECKED or GREYED.  This message is issued when a POPUP statement in a MENUEX resource contains one of these optional modifiers.  In a MENUEX resource these modifiers are replaced by MFT_* and MFS_* flags.


79 Type/State not valid for MENU MENUITEM controls.

A MENUITEM statement in MENU resource must not specify state and type information using the MFT_* or MFS_* flags.  This message is issued when type or state information is specified for a MENUITEM in a MENU resource.

Example:

     mymenu MENU

     BEGIN

         MENUITEM "item", MY_ID, MFT_STRING, MFS_GREYED

     END

In a MENU resource this information is specified using option modifiers such as GREYED or CHECKED.


80 MENUITEM options not valid for MENUEX MENUITEM controls.

A MENUITEM statement in a MENUEX resource may not use optional modifiers such as CHECKED or GREYED.  This message is issued when a MENUITEM statement in a MENUEX resource contains one of these optional modifiers.  In a MENUEX resource these modifiers are replaced by MFT_* and MFS_* flags.


81 HELPID not valid for DIALOG.

You may not specify a help id for a DIALOG resource.  This message is issued when a help id is found with a DIALOG resource.

Example:

     my_dlg DIALOG 0, 0, 100, 100, MY_HELPID

A help id may be specified for a DIALOGEX resource.


82 Font Italic setting not allowed for DIALOG.

You may not specify an italic font for a DIALOG resource.  This message is issued when the italic flag has been specified in a FONT statement in a DIALOG resource.

Example:

     my_dlg DIALOG 0, 0, 100, 100

     FONT "helvetica", 8,  FW_BOLD, 1

The italic flag may be specified for DIALOGEX resources.


83 Font Weight setting not allowed for DIALOG.

You may not specify a font weight for a DIALOG resource.  This message is issued when a font weight has been specified in a FONT statement in a DIALOG resource.

Example:

     my_dlg DIALOG 0, 0, 100, 100

     FONT "helvetica", 8,  FW_BOLD

A font weight may be specified for DIALOGEX resources.


84 HELPID not valid for DIALOG controls.

You may not specify a help id for a control in a DIALOG resource.  This message is issued when a help id is specified for a control in a DIALOG resource.

Example:

     my_dlg DIALOG 0, 0, 100, 100

     BEGIN

         CONTROL "None",  MY_ID, "BUTTON",

                  BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE

                 12, 40, 30, 10,  0, MY_HELPID

     END

A help id may be specified for a control in DIALOGEX resource.


85 Data Elements not valid for DIALOG controls.

This indicates that a list of data values has been found following a control in a DIALOG resource.  Data can only follow control statements in a DIALOGEX resource.


86 <value> is not a valid resource id.

This message is issued when a numeric identifier has been specified for a resource but the value is outside the allowable range.


87 User interrupt detected.

Processing was stopped to allow another user action to occur.


88 Resource type for resource "<resource>" is greater than 32767.

When a number is used to identify the type of a resource the number must be between 0 and 32767.  This message is issued when a number has been specified as a resource type that is outside the allowable range.

Example:

     MYRES 0xF000 { 0 }


89 Resource ID "<id>" is greater than 32767.

When a number is used to identify a resource the number must be between 0 and 32767.  This message is issued when a number has been specified as a resource identifier that is outside the allowable range.

Example:

     0xF000 ICON "t.ico"


90 Unmatched quotation mark on command line.

Quotations marks may be used on the WRC command line to delimit file or path names.  This message indicates that a quotation mark was found on the command line but no matching quotation mark could be found.