Microsoft KB Archive/102620
PRB: Build Errors Caused by Incorrect TMP Variable Setting
The information in this article applies to:
- The C/C++ Compiler (CL.EXE), included with:
- Microsoft Visual C++, versions 1.0, 1.5
An attempt to build an application in Visual C++ version 1.0 fails and one of the following messages appears:
If you attempt to build an application in the Visual Workbench or from an MS-DOS prompt in Windows, the Resource Compiler generates a message such as the following:
Fatal Error C1007: unrecognized flag '\RC23' in 'c1' RC: fatal error RW1016: RC terminating after preprocessor errors
fatal error C1023: cannot open source file '' RC: fatal error RW1016: RC terminating after preprocessor errors
If you attempt to build an application in MS-DOS when Windows is not running, the results of the NMAKE, CL, or LINK command is similar to the following:
Phar lap err 58: Can't create VM swap file of size 0 in directory C:\ \
The TMP environment variable is not valid. The Resource Compiler creates a RC23 file in the TMP directory to store information between compiler passes. If the TMP environment variable ends with a space, the filename appears to the Resource Compiler as an option switch.
If the TMP environment variable points to a read-only drive, then RC cannot write the temporary file or it cannot read it back which results a C1023 error.
When any of the MS-DOS-extended utilities (such as NMAKE versions 1.3, 1.4, C/C++ versions 8.0, 8.0c, or LINK versions 5.5, 5.6) are invoked from MS-DOS outside Windows, they immediately return with the Phar lap error because the MS-DOS-extender attempts to create a temporary file for virtual memory storage.
Verify that the TMP environment variable is valid. It must point to a valid directory on a read-write drive that has enough available free space to store the temporary files.
It may be difficult to detect a trailing space in the TMP environment variable. It is specified in your AUTOEXEC.BAT file with a statement similar to the following:
NOTE: In some text editors, you cannot see a blank space at the end of the line. You must either retype the line or use the END key to go to the end of the line and erase the blank spaces with the BACKSPACE key. If you start Windows from your AUTOEXEC.BAT file, verify that you change the TMP setting before the command that starts Windows.
Additional query words: 1.00 1.50 1.30 1.40 3.11 5.50 8.00 8.00c DOSXNT
Keywords : kb16bitonly kbCompiler kbprb
Issue type : kbprb
Technology : kbVCsearch kbAudDeveloper kbCVCComp
Last Reviewed: May 8, 2001