PRB: Possible Causes for RC Error RW1021
ID: Q117824
The information in this article applies to:
- Microsoft Visual C++ for Windows, versions 1.0, 1.5
SYMPTOMS
While building a project, the following error message appears:
RC: fatal error RW1021: I/O error reading file.
CAUSE
The RW1021 error message is usually caused by either an actual I/O
error when reading a file (it doesn't exist, or there are network or
drive problems) or by corruption of the actual file itself, which
causes the RC compiler to report a read error.
RW1021 can also be caused by running LINK version 5.6 on Windows NT
version 3.5. This version of the linker is compatible with Windows NT
version 3.1.
Using VBX controls from Far Point with Visual C++, version 1.5, can also
cause this error during resource binding.
RESOLUTION
If you are using Far Point VBX controls, the solution is to use LINK,
version 5.5, from Visual C++, version 1.0, with the /CO:N option; however,
keep using the CVPACK, version 4.26, from Visual C++, version 1.5. NOTE:
LINK 5.5 cannot be used within the Visual Workbench, version 1.5 if it is
running on NT 3.1
If you are not using Far Point VBX controls, check for one of the
following, all of which have been known to cause this error:
- Bad TMP or TEMP environment variables: Make sure that there are no extra
spaces, semicolons, or control characters in these variables. Make sure
that they point to drives and directories that are both valid and have
enough free disk space. If either variable is incorrect, erase the lines
in your AUTOEXEC.BAT file that set the offending variables and retype
the settings.
- No .EXE file with which to bind the .RES file: In other words, LINK was
invoked and reported no errors, but no .EXE file was created. This can
happen if you've used the /ONERROR:NOEXE linker option.
- Disk errors: Run a disk-checking utility such as the Norton Disk Doctor
to verify that the drive is all right.
- Corrupt files: This can be caused by bad debugging information or by
mixing incorrect versions of different utilities. Try compiling and
linking with no debugging information, and then verify that the versions
of the utilities are correct.
- A bad version of RCDLL.DLL: Make sure that you have only one copy of
this file on the system and that it has not been corrupted.
- Network or driver problems: Make sure to disable all network and
unnecessary TSRs and device drivers, especially any disk caches, before
you test.
- Different command interpreters: Try using COMMAND.COM instead of command
interpreters such as 4DOS or NDOS.
- Low memory: Make sure, using MEM or MEM /C, that there is at least 4 MB
of XMS memory available. A disk cache or RAM drive may use a great deal
of memory.
- Windows NT 3.5 compatibility: Update to version 5.60.220 of the
linker which is available on the Window NT v3.5 CD in the
\SUPPORT\LINKER\16BIT directory. If you have the floppy disk set
- The Linker is available on MSDN, MSL and INTERNET (See below).
MORE INFORMATION
If none of the suggestions in this article has helped, delete the .PDB
and .PCH files and split any large source-code files. After doing so,
do one of the following:
- Reduce the amount of CodeView debugging information by using /Zd
instead of /Zi in some or all of the modules. Use a single .PDB
file.
-or-
- Eliminate use of the .PDB files by using /Z7 instead of /Zi or /Zd.
To get the Windows NT version 3.5 compatible linker version 5.60.220, the
following file is available for download from the Microsoft Software
Library:
~ Lnk562.exe (size: 195023 bytes)
For more information about downloading files from the Microsoft Software
Library, please see the following article in the Microsoft Knowledge Base:
ARTICLE-ID: Q119591
TITLE : How to Obtain Microsoft Support Files from Online Services
Keywords : kbtool kb16bitonly LinkIss TlsMisc
Version : 1.0 1.5
Platform : WINDOWS
Issue type : kbprb
Last Reviewed: July 24, 1997