KnowledgeBase Archive

An Archive of Early Microsoft KnowledgeBase Articles

View on GitHub

Q59479: Cannot Open Compiler Intermediate File

Article: Q59479
Product(s): See article
Version(s): 5.10   | 5.10
Operating System(s): MS-DOS | OS/2
Keyword(s): ENDUSER | | mspl13_c
Last Modified: 17-DEC-1990

In DOS mode, the error number for the "cannot open compiler
intermediate file" message is C1042; in OS/2, the error number is
C1043. This is caused by an incorrect setting of the TMP environment
variable, when a semicolon ends the path. For example:

   TMP=C:\TMP;

This causes the compiler to return the following error message:

   fatal error C1042: cannot open compiler intermediate file -- DOS

or

   fatal error C1043: cannot open compiler intermediate file -- OS/2

The correct way to set up the TMP environment variable is as follows:

   >SET TMP=C:\TMP<RETURN>

It is important that the environment string does not end with a
semicolon because the compiler appends the intermediate filename to
the TMP path. By removing the semicolon from the path, the compiler
can create the file correctly.

Since there are other Microsoft products that utilize the TMP
environment variable, it is safe to remove the semicolon from the end
of the TMP environment variable path.

This is true only for the TMP variable because other environment
variables are used only for a search path.

THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Copyright Microsoft Corporation 1986-2002.