I'm compiling a QtQuick application using Visual Studio 2019. I built a basic interface which is running well. The interface itself is very simple for now, it's just 3 labels. At this point my project compiles and links without problems.
Now I need to add a custom font file in the qrs resources, in order to load it from a FontLoader object in my qml code. Its size is 11'621KB.
Doing that, I can no longer compile my project. I get the following error:
Error C1060 compiler is out of heap space - qrc_qml.cpp - 745259
Of course, I tried the following link before writing this post: Microsoft Documentation - Fatal Error C1060
None of the proposed solutions worked for me. Furthermore, I cannot figure out how a simple 11MB file may cause a heap overflow on a computer equipped with 16GB of RAM, on which only a Visual Studio compiler is running.
AFAIK the issue seems to come from the Qt resources compiler, perhaps it generates a too long qrc_qml.cpp file. But if barely an 11 MB file added in the resources (which was previously empty) is enough to saturate the memory, then I am very concerned about the real possibility of using Qt for my projects. Some of them will need much, much, much more than that.
I believe (and I hope) that there is a simple solution. Can someone explain me what I should do to resolve a such issue?