PRB: Build Errors Caused by Incorrect TMP Variable Setting

ID: Q102620


The information in this article applies to:


SYMPTOMS

An attempt to build an application in Visual C++ version 1.0 fails and one of the following messages appears:


CAUSE

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.


RESOLUTION

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:


   SET TMP=C:\TMP 
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 TlsMisc 
Version           : 1.00 1.50
Platform          : WINDOWS 
Issue type        : 

Last Reviewed: July 26, 1999