Resource Compiler Errors RW1004 through RW4004

The following topics cover Resource Compiler Errors RW1004 through RW4004:

Resource Compiler Fatal Error RW1004
Unexpected end of file

This error can be caused by omitting the linefeed and carriage-return characters on the last line of a text file.

Resource Compiler Fatal Error RW1009
Error creating resource-name

Could not create specified .RES file. Make sure it is not being created on a read-only drive. Use the /V option to find out whether the file is being created.

Resource Compiler Fatal Error RW1016
RC terminating after preprocessor errors

The Resource Compiler halted due to other errors. Fix the other errors and recompile.

Resource Compiler Fatal Error RW1021
I/O error reading file

The Resource Compiler was not able to read a file. Check that the drive containing the file is available and that the file is valid.

Resource Compiler Fatal Error RW1022
I/O error writing file

The Resource Compiler could not write to a file. This error may be caused by insufficient disk space. You must have free space equivalent to about twice the size of the executable file you are creating. Other possible reasons for this error are:

Resource Compiler Fatal Error RW1023
I/O error writing file, drive full

The Resource Compiler could not write a file to a drive because the drive was full. You must have free space equivalent to about twice the size of the executable file you are creating.

Resource Compiler Fatal Error RW1025
Out of far heap memory

There wasn't enough memory. Consider using the Control Panel, System icon, Performance tab to increase your system's virtual memory, reboot, and retry.

Resource Compiler Fatal Error RW1030
Output Error

The output error can be caused by any of following conditions:

Resource Compiler Error RW2001
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 RW2002
Parsing error

The parsing error can be caused by any of following conditions:

Resource Compiler Error RW2003
Generation Error

General errors can be caused by any of following conditions:

Resource Compiler Warning RW4001
.EXE processing options (/L /M /P /T /K /E /31 or /30)
.EXE processing options (/L /M /P /T /K /E /31 or /30) were specified when no executable file would be processed. These options can only be used when the result is an .EXE file (not a .RES file).

Resource Compiler Warning RW4003
SHIFT or CONTROL used without VIRTKEY
In an accelerator table resource, SHIFT or CONTROL require VIRTKEY. Because SHIFT and CONTROL are indicated as flag bits in a VIRTKEY type accelerator, they cannot exist independent from a VIRTKEY.

Resource Compiler Warning RW4004
ASCII character not equivalent to virtual key code
A string literal was used for the virtual key code in a VIRTKEY type accelerator. This warning lets you continue, but be aware that the accelerator keys generated may not match the string you indicated. (VIRTKEYs use different key codes than ASCII accelerators.)


Return to Main Resource Compiler Messages Page