Recently I want to use the Xtreme toolkitpro interface library. After installation, use vc6 to generate a project based on the Wizard. the following error occurs during debug Compilation:
Fatal error c1076: Compiler limit: Internal heap limit reached; Use/ZM to specify a higher limit
The solution is as follows:
Project-> Settings-> C ++ tab. There is a project option (o) below. Add/zm1000 to the end of the parameter in the editing box, or/zm2000 as long as it is a multiple, microsoft's explanation is as follows:
/ZM (specify the memory allocation limit of the pre-compilation header)
Determine the compiler's memory allocation limit for the pre-compiled header.
/Zmnumber
Parameter number
Proportional Factor used to determine the memory allocation limit of the compiler for the pre-compilation header.
Remarks
The number parameter is a proportional factor of the default value of 100, which specifies that the memory is allocated to 50 MB. Maximum Value: 2000. The following table describes how to modify the memory allocation.
Value Memory Allocation
10 5.0 MB
100 50 MB
200 100 MB
1000 500 mb
2000 1000 MB
In earlier versions of Visual C ++, the compiler used a large number of discrete heaps, and each heap had certain limitations. The compiler can now dynamically increase the heap as needed. It only requires that the size of the memory allocated to the pre-compilation header be fixed. Only a small number of very large or very complexProgramIn this case, the heap size limit of the pre-compiled header is exceeded. If the program exceeds these limits, use/ZM to adjust the total size of all limits.
In most cases, this compiler option is not required. This option is used if an error message is reported during program compilation and/ZM should have a value.
Msdn explains this as follows:
"/ZM (specify the memory allocation limit of the pre-compilation header)
Determine the compiler's memory allocation limit for the pre-compiled header.
In earlier versions of Visual C ++, the compiler used a large number of discrete heaps, and each heap had certain limitations. The compiler can now dynamically increase the heap as needed. It only requires that the size of the memory allocated to the pre-compilation header be fixed. Only when a few programs involve very large or very complex programs will the size of the heap exceeding the pre-compiled header be exceeded. If the process exceeds these limits, use/ZM to adjust the total size of all limits.
In most cases, this compiler option is not required. This option is used if an error message is reported during program compilation and/ZM should have a value ."
Ah, can my program count as "very few very large or very complex programs involved "?
Msdn provides several solutions, but it is useless. It may be because I used vc6, so I have to find a solution myself.
Solution:
Project> Settings> C/C ++ Tab
The following is a command area for "project options ".
Add
/Zm1000
Change to/zm2000. It can be a whole hundred.
Re-compile, OK