Resource Compiler Errors RC2001 through RC2129

Resource Compiler Error RC2001
newline in constant

A string constant was continued on a second line without either a backslash (\) or closing and opening double quotation marks ("). To break a string constant that is on two lines in the source file, do one of the following:

It is not sufficient to end the first line with \n, the escape sequence for embedding a newline character in a string constant.

Resource Compiler Error RC2003
expected 'defined id'

An identifier was expected after the specified preprocessing keyword.

Resource Compiler Error RC2004
expected 'defined(id)'

An identifier was expected after the left parenthesis following the specified preprocessing keyword.

Resource Compiler Error RC2005
#line expected a line number, found 'token'

A #line directive lacked the required line-number specification.

Resource Compiler Error RC2006
#include expected a filename, found 'token'
An #include directive lacked the required filename specification.

Resource Compiler Error RC2007
#define syntax

An identifier was expected following #define in a preprocessing directive.

Resource Compiler Error RC2008
'character' : unexpected in macro definition

The given character was found immediately following the name of the macro.

Resource Compiler Error RC2009
reuse of macro formal 'identifier'

The given identifier was used more than once in the formal parameter list of a macro definition.

Resource Compiler Error RC2010
'character' : unexpected in formal list

The given character was used incorrectly in the formal parameter list of a macro definition.

Resource Compiler Error RC2012
missing name following '<'

An #include directive lacked the required filename specification.

Resource Compiler Error RC2013
missing '>'

The closing angle bracket (>) was missing from an #include directive.

Resource Compiler Error RC2014
preprocessor command must start as first non-whitespace

Non-white-space characters appeared before the number sign (#) of a preprocessor directive on the same line.

Resource Compiler Error RC2015
too many chars in constant

A character constant contained more than two characters. Character constants are limited to one character (standard character constants) or two characters (long character constants). Note that an escape sequence (for example, \t for tab) is converted to a single character.

Resource Compiler Error RC2016
no closing single quote

A newline character was found before the closing single quotation mark of a character constant.

Resource Compiler Error RC2017
illegal escape sequence

An escape sequence appeared where one was not expected. An escape sequence - a backslash ( \ ) followed by a number or letter - may occur only in a character or string constant.

Resource Compiler Error RC2018
unknown character 'hexnumber'

The ASCII character corresponding to the given hexadecimal number appeared in the source file but is an illegal character. One possible cause of this error is corruption of the source file.

Resource Compiler Error RC2019
expected preprocessor directive, found 'character'

The given character followed a number sign (#), but it was not the first letter of a preprocessor directive.

Resource Compiler Error RC2020
illegal digit number for base radix

The specified digit is not a valid digit for the base specified by radix. Either the digit or the radix could be incorrect. Octal digits must be numbers from 0 to 7, and hexadecimal digits must be numbers from 0 to 9 or letters from A through E.

Resource Compiler Error RC2021
expected exponent value, not 'character'

The given character was used as the exponent of a floating-point constant but was not a valid number.

Resource Compiler Error RC2022
'number' : too big for character

The octal number following a backslash (\) in a character or string constant was too large to be represented as a character.

Resource Compiler Error RC2101
Invalid directive in preprocessed RC file

The RC file contains a #pragma directive. Use the #ifndef preprocessor directive with the RC_INVOKED constant that the Resource Compiler defines when it processes an include file. Place the #pragma directive inside a block of code that is not processed when the RC_INVOKED constant is defined. Code in the block is processed only by the C/C++ compiler and not by the Resource Compiler. The following sample code demonstrates this technique:

  #ifndef RC_INVOKED
  #pragma pack(2)  // C/C++ only, ignored by Resource Compiler
  #endif
 

The #pragma preprocessor directive has no meaning in an .RC file. The #include preprocessor directive is used frequently in an .RC file to include a header file (either a project-based custom header file or a standard header file provided by Microsoft with one of its products). Some of these include files contain the #pragma directive. Because a header file can include one or more other header files, the file that contains the offending #pragma directive may not be immediately obvious. The #ifndef RC_INVOKED technique can control including header files in project-based header files.

Resource Compiler Error RC2102
string literal too long

An RCDATA string exceeded the maximum allowable length.

Resource Compiler Error RC2103
unexpected end of file in string literal

An end of file was found before the end of a string. The string is probably missing a closing double quotation mark (").

Resource Compiler Error RC2104
undefined keyword or key name: key

The specified keyword or key name was not defined. If you encounter the following error message:
undefined keyword or key name: MFT_STRING

Open the file ...\mfc\include\AfxRes.h and add the following include directive:
#include <winresrc.h>

Resource Compiler Error RC2105
BEGIN expected in string table

The BEGIN keyword must immediately follow the ACCELERATORS keyword.

Resource Compiler Error RC2106
BEGIN expected in accelerator table

The BEGIN keyword must immediately follow the ACCELERATORS keyword.

Resource Compiler Error RC2107
expected numeric command value

RC was expecting a numeric idvalue field in the ACCELERATORS statement. Make sure that you have used a #define constant to specify the value and that the constant is spelled correctly.

Resource Compiler Error RC2108
unbalanced parentheses

An open parenthesis was not matched with a closing parenthesis.

Resource Compiler Error RC2109
expected numerical dialog constant

A DIALOG statement requires integer values for the x, y, width, and height fields. Make sure these values are included after the DIALOG keyword and that they are not negative.

Resource Compiler Error RC2110
expected numerical dialog constant

A DIALOG statement requires integer values for the x, y, width, and height fields. Make sure these values are included after the DIALOG keyword and that they are not negative.

Resource Compiler Error RC2111
invalid control type

Each CONTROL statement in a DIALOG statement must be one of the following: 3STATE, AUTO3, AUTOCHECK, AUTORADIO, BEDIT, CHECKBOX, COMBOBOX, CONTROL, CTEXT, DEFPUSHBUTTON, EDITTEXT, GROUPBOX, HEDIT, ICON, IEDIT, LISTBOX, LTEXT, PUSHBOX, PUSHBUTTON, RADIOBUTTON, RTEXT, SCROLLBAR, USERBUTTON. Make sure these CONTROL statements are spelled correctly.

Resource Compiler Error RC2112
BEGIN expected in dialog

The BEGIN keyword must immediately follow the DIALOG keyword.

Resource Compiler Error RC2113
END expected in dialog

The END keyword must occur at the end of a DIALOG statement. Make sure there are no open quotes left from the preceding statement.

Resource Compiler Error RC2114
expected control class name

The class field of a CONTROL statement in the DIALOG statement must be one of the following types: BUTTON, COMBOBOX, EDIT, LISTBOX, SCROLLBAR, STATIC, or user-defined. Make sure the class is spelled correctly.

Resource Compiler Error RC2115
text string or ordinal expected in control

The text field of a CONTROL statement in the DIALOG statement must be either a text string or an ordinal reference to the type of control is expected. If using an ordinal, make sure that you have a #define statement for the control.

Resource Compiler Error RC2116
expecting number for ID

Expecting a number for the id field of a control statement in the DIALOG statement. Make sure you have a number or #define statement for the control ID.

Resource Compiler Error RC2117
expected numeric point size

The pointsize field of the FONT option in the DIALOG statement must be an integer point size value.

Resource Compiler Error RC2118
expected font face name

The typeface field of the FONT option in the DIALOG statement must be an ASCII character string enclosed in double quotation marks. This field specifies the name of a font.

Resource Compiler Error RC2119
expecting quoted string in dialog title

The captiontext field of the CAPTION option in the DIALOG statement must be an ASCII character string enclosed in double quotation marks.

Resource Compiler Error RC2120
expecting quoted string in dialog class

The class field of the CLASS option in the DIALOG statement must be an integer or a string, enclosed in double quotation marks.

Resource Compiler Error RC2121
BEGIN expected in menu

The BEGIN keyword must immediately follow the MENU keyword.

Resource Compiler Error RC2122
unknown menu subtype

The item-definition field of the MENU statement can contain only MENUITEM and POPUP statements.

Resource Compiler Error RC2123
END expected in menu

The END keyword must come at the end of a MENU statement. Make sure you do not have any open quotation marks or a mismatched pair of BEGIN and END statements.

Resource Compiler Error RC2124
empty menus not allowed

An END keyword appears before any menu items are defined in the MENU statement. Empty menus are not permitted by the Resource Compiler. Make sure you do not have any open quotation marks within the MENU statement.

Resource Compiler Error RC2125
expected ID value for menuitem

The MENU statement must contain a menuID field, which specifies the name or number that identifies the menu resource.

Resource Compiler Error RC2126
expected menu string

Each MENUITEM and POPUP statement must contain a text field, which is a string enclosed in double quotation marks that specifies the name of the menu item or pop-up menu. A MENUITEM SEPARATOR statement requires no quoted string.

Resource Compiler Error RC2127
version WORDs separated by commas expected

Version numbers in a version resource should be of type WORD, and separated by commas.

Resource Compiler Error RC2128
DWORD expected

A valid version number was not found. It must be a DWORD type.

Resource Compiler Error RC2129
BEGIN expected in VERSIONINFO resource

The BEGIN keyword must immediately follow the VERSIONINFO keyword.


Return to Main Resource Compiler Messages Page