Qt编译出现cc1plus.exe: out of memory allocating 65536 bytes问题

今天编译Qt程序,出现这个问题:

cc1plus.exe: out of memory allocating 65536 bytes

这个还没有遇到过,上网查了下。问题原因是资源文件过大。

qt的资源文件在存储时,是被存储在静态数组中的,资源文件过大时,可能会超出静态数组的大小,导致这个编译错误。

在工程文件中加入下面选项,可以解决这个错误:

CONFIG += resources_big
原文地址:https://www.cnblogs.com/fensnote/p/13436458.html