Visual Studio Express:致命错误 c1060,编译器堆空间不足 [英] Visual Studio Express: fatal error c1060, the compiler is out of heap space

查看:117
本文介绍了Visual Studio Express:致命错误 c1060,编译器堆空间不足的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 VC 11 从其源代码构建一个程序,当编译器将要完成时,它会在标题中引发错误.正如我在此处和其他论坛上读到的那样,我一直在尝试关闭尽可能多的程序并扩大 Windows 中交换文件的大小……它们不起作用.

我读过一个名为 m 的参数,但我不明白如何使用它.

你能帮我吗?

解决方案

看看 本文档提供了可能的解决方案:

我也遇到了这个问题,发现文档很有用.要点:

<块引用>

  1. 如果编译器还发出错误 C1076 和 C3859,请使用/Zm 编译器选项降低内存分配限制.更多堆空间如果您降低剩余内存,则可用于您的应用程序分配.

    如果/Zm 选项已设置,请尝试将其删除.堆空间可能是由于选项中指定的内存分配限制而耗尽太高了.如果删除/Zm,编译器将使用默认限制选项.

  2. 如果您在 64 位平台上编译,请使用 64 位编译器工具集.有关信息,请参见如何:启用 64 位 Visual C++命令行上的工具集.

  3. 在 32 位 Windows 上,尝试使用/3GB boot.ini 开关.

  4. 增加 Windows 交换文件的大小.

  5. 关闭其他正在运行的程序.

  6. 删除不必要的包含文件.

  7. 消除不必要的全局变量,例如,通过动态分配内存而不是声明一个大数组.

  8. 消除未使用的声明.

  9. 将当前文件拆分成更小的文件.

I'm trying to build a program from its source code with VC 11 and when the compiler is going to finish, it raises the error in title. As I've read here and in other forums, I've alteady tried both to close as many programs as possibile and to enlarge the size of the swap file in Windows...they don't work.

I've read about a parameter called m but I don't understand how to use it.

Can you please help me?

解决方案

Take a look at this documentation which gives possible solutions:

I also had that problem and found the documentation useful. Main points:

  1. If the compiler also issues errors C1076 and C3859, use the /Zm compiler option to lower the memory allocation limit. More heap space is available to your application if you lower the remaining memory allocation.

    If the /Zm option is already set, try removing it. Heap space might be exhausted because the memory allocation limit specified in the option is too high. The compiler uses a default limit if you remove the /Zm option.

  2. If you are compiling on a 64-bit platform, use the 64-bit compiler toolset. For information, see How to: Enable a 64-Bit Visual C++ Toolset on the Command Line.

  3. On 32-bit Windows, try using the /3GB boot.ini switch.

  4. Increase the size of the Windows swap-file.

  5. Close other running programs.

  6. Eliminate unnecessary include files.

  7. Eliminate unnecessary global variables, for example, by allocating memory dynamically instead of declaring a large array.

  8. Eliminate unused declarations.

  9. Split the current file into smaller files.

这篇关于Visual Studio Express:致命错误 c1060,编译器堆空间不足的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆