KnowledgeBase Archive

An Archive of Early Microsoft KnowledgeBase Articles

View on GitHub

Q36953: Warning C1015 May be Caused by Lack of Available File Handles

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

Compiler error C1015, which is not documented in the text, is often
caused by an error finding or opening an include file. This new error
message is noted in the C Version 5.10 file ERRMSG.DOC.

This error can occur if the INCLUDE environment variable has
not been set correctly for your include file directory or the TMP
variable is set to a Ram Disk.

Especially under DOS, this error also can be generated by not having
enough file handles available. (A file handle is an integer used by
the operating system to keep track of every open file.) The number of
file handles available to DOS can be increased from the default of
eight to a number up to 20 (or higher with some OEM adaptations of
MS-DOS versions later than Version 3.20) by placing the following line
in CONFIG.SYS and rebooting your computer:

FILES=20

It  has been reported that if you do not set files above the default
of eight, error C1015 appears soon after compilation begins. Setting
files to 20 corrects the problem.

File handles will typically be used during compilation and linkage by
the CL driver, the compiler passes, your C source code file, include
files, the linker, libraries, and temporary files created by the
compiler or linker.

Closing a file makes its handle available to the operating system
again, so the lack of available file handles refers to the number of
files open at any one time.

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.