Microsoft KB Archive/195738

= BUG: You may receive a "fatal error C1001: INTERNAL COMPILER ERROR" error message when template classes or template class header files are included in a precompiled header file =

Article ID: 195738

Article Last Modified on 5/26/2005

-

APPLIES TO


 * Microsoft Visual C++ 6.0 Enterprise Edition
 * Microsoft Visual C++ 6.0 Professional Edition
 * Microsoft Visual C++ 6.0 Standard Edition

-



This article was previously published under Q195738



SYMPTOMS
When template classes or template class header files are included in a precompiled header file, the compiler may generate the following error for files that use the precompiled header:

fatal error C1001: INTERNAL COMPILER ERROR

(compiler file 'msc1.cpp', line 1786)

-or-

fatal error C1001: INTERNAL COMPILER ERROR

(compiler file 'msc1.cpp', line 1188)

This error occurs only on machines with the Windows 95 or Windows 98 operating system.



CAUSE
The compiler exceeds the allocated memory limit.



RESOLUTION
Use one of the following three suggested workarounds:
 * Use compiler switch /Zm#nn to increase the compiler's heap memory allocation limit. The default value of #nn is 100 and the maximum value is 2000. Manually add this switch in Developer Studio: under the Project menu, click Setting, the click C/C++, then Project Options. Usually, a value of 1000 works.

NOTE: You may need to increase the system virtual memory to accommodate the increased #nn for /Zm.
 * Remove the template class header files from the precompiled header file.
 * Use "Automatic use of precompiled headers" (/YX switch), or, "Not using precompiled header."



STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed in the "Applies to" section.

This problem was corrected in Microsoft Visual C++ .NET.

Keywords: kbbug kbfix kbnoupdate kblangcpp kbcompiler KB195738

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.