巨大的初始化列表,如何解决“严重错误C1060:编译器空间不足". [英] Huge initialization list, how to fix "fatal error C1060: compiler is out of heap space"
问题描述
我正在尝试编译一个简单的C ++文件,该文件可以:
I'm trying to compile a simple C++ file that does:
static const unsigned char content[] =
{
// 29MB of data written as "0x1E, 0x83, 0x3E, 0x86, 0xC8, 0x80, ...". 10 values per line
};
要编译的文件几乎有3M行,约为200Mo
The file to compile has almost 3M lines and is ~200Mo
这是资源管理系统的输出,试图将29Mo的资源文件(假设它是视频文件)嵌入到我的二进制文件中,以便以后在运行时使用.
This is an output from a ressources management system, trying to embed in my binary a 29Mo ressource file (let's assume it's a video file) for later use at runtime.
我编译时,VS2015报告:
When I compile, VS2015 reports:
严重错误C1060:编译器空间不足
fatal error C1060: compiler is out of heap space
是否有其他选择(使用除静态const unsigned char之外的其他方法)?使文件的行数更少,但每行字符更多?...
Is there any alternative to that (use something else than a static const unsigned char)? Make the file have less lines but more characters per line? ...
注意:我尝试了/Zm1000选项,但没有成功.
Note: I tried /Zm1000 option without success.