一个编译设置的问题

侠雨飞飞 2003-04-09 09:49:56
呵呵,应该是很简单吧,只是偶不会

编译时,系统提示——
fatal error C1076: compiler limit : internal heap limit reached; use /Zm to specify a higher limit

这个/Zm 在哪里加,附加参数是什么?
谢谢
:)
...全文
60 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
loopyifly 2003-04-09
  • 打赏
  • 举报
回复
nod
侠雨飞飞 2003-04-09
  • 打赏
  • 举报
回复
谢谢各位
jian 2003-04-09
  • 打赏
  • 举报
回复
project -> settings -> c/c++ ->project options

格式:/Zm数字
数字的默认值是100,最大值是2000。你调大一些就可以了
jian 2003-04-09
  • 打赏
  • 举报
回复
Fatal Error C1076
compiler limit : internal heap limit reached; use /Zm to specify a higher limit

The compiler ran out of storage for items that it stores in its heap. Usually this is the result of having too many symbols.

One of the following may be a solution:

Use the /Zm compiler option to set the compiler's memory allocation limit.


Simplify the program:
Eliminate unnecessary include files, especially unneeded #defines and function prototypes.


Eliminate some global variables. For instance, use a pointer to allocate memory dynamically, at run time, instead of declaring a large array.


Eliminate unused declarations.


Break up very large functions into smaller ones.


Break up very large classes into smaller ones.


Split the current file into two or more files and compile them separately.
Note If you get this error message immediately upon starting the build process, you have probably specified too high a value for /Zm, given the specific details of your program. Change the /Zm value to a lower one and re-run the build.


--------------------------------------------------------------------------------
/Zm (Specify Memory Allocation Limit)
Home | Overview | How Do I | Compiler Options

The /Zmnumber option determines the compiler's memory allocation limit. The number argument is a scaling factor, with a default value of 100 (that is, 100%). The maximum value is 2000.

The compiler uses a number of discrete heaps, each of which has a finite limit. The total of the size limits for all heaps is about 105 MB, but when any one heap is exhausted, the compiler cannot continue. Memory is allocated only as needed; the 105 MB limit is just to keep from using too much memory. Exceeding any one of the discrete-heap size limits occurs only in rare circumstances involving very large or very complex programs. Should your program exceed one of these limits, use /Zm to scale the total size of all the limits. For example, when /Zm200 is specified, the total of all heap size limit is 210MB.

Note In most cases, use of this compiler option is not necessary. Use it if compiling your program causes error message C1076: "compiler limit : internal heap limit reached."
guanxg 2003-04-09
  • 打赏
  • 举报
回复
/zm是参数,在工程设置选项中添加,你的堆设置的太小了。
emmai 2003-04-09
  • 打赏
  • 举报
回复
project ---> settings --> c/c++ --->project options

16,471

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC相关问题讨论
社区管理员
  • 基础类社区
  • Web++
  • encoderlee
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

        VC/MFC社区版块或许是CSDN最“古老”的版块了,记忆之中,与CSDN的年龄几乎差不多。随着时间的推移,MFC技术渐渐的偏离了开发主流,若干年之后的今天,当我们面对着微软的这个经典之笔,内心充满着敬意,那些曾经的记忆,可以说代表着二十年前曾经的辉煌……
        向经典致敬,或许是老一代程序员内心里面难以释怀的感受。互联网大行其道的今天,我们期待着MFC技术能够恢复其曾经的辉煌,或许这个期待会永远成为一种“梦想”,或许一切皆有可能……
        我们希望这个版块可以很好的适配Web时代,期待更好的互联网技术能够使得MFC技术框架得以重现活力,……

试试用AI创作助手写篇文章吧