Solved qrc_resources.cpp fatal error C1060: compiler is out of heap space
-
I've been porting quite a large project developed originally with Qt 4.8 and I'm and updating it for Qt 5.8. I've fixed all the warnings and errors so far.
There is now only one issue remaining or at least thats all I see:
Issues Panel contains:
C:\Users\u49100\Documents\projectName\build-projectName-Desktop_Qt_5_8_0_MSVC2013_32bit-Debug\debug\qrc_qresources.cpp:1326934: error: C1060: compiler is out of heap space
In the Compiler Output panel:
debug\qrc_qresources.cpp(1326934) : fatal error C1060: compiler is out of heap space jom: C:\Users\u49100\Documents\projectName\build-projectName-Desktop_Qt_5_8_0_MSVC2013_32bit-Debug\Makefile.Debug [debug\qrc_qresources.obj] Error 2
I have no clue what the reason for this is and I've tried google but no further forward.
-
@SPlatten said in qrc_resources.cpp fatal error C1060: compiler is out of heap space:
I've never done this before, is it simply a case of copying chunks of the file and adding another .qrc file with the content?
Yes, exactly, a simple copy-paste. Or rather, cut-paste.
-
Try to split your resources into separate, smaller files. Compiling QRC consumes vast amounts of RAM etc. so it's quite easy to run into memory problems.
Your Qt app won't notice any difference - QRC paths inside of app stay the same, regardless of how many real concrete QRC files are used.
-
I've never done this before, is it simply a case of copying chunks of the file and adding another .qrc file with the content?
-
@SPlatten said in qrc_resources.cpp fatal error C1060: compiler is out of heap space:
I've never done this before, is it simply a case of copying chunks of the file and adding another .qrc file with the content?
Yes, exactly, a simple copy-paste. Or rather, cut-paste.
-
Hi,
Out of curiosity, how many resources do you have in the original file ?
-
The original XML file contains 548 lines.
358 of these are images.
5 are JavaScript files
The rest are QML files and fonts. -
Having split the original resource into 3 files, it stills come back with the same error on the last file which contains all the QML files.
And now I'm also getting:
C1063: INTERNAL COMPILER ERROR c1xx
-
@SPlatten you have to rerun qmake after adding new resource files or when you edited a resource file
-
@J-Hilk, Done that, still a problem.
-
Thats weird! I've had memory issues in QRC with images, but with QML code - never. Something else must be causing the problem here.
2 things to try:
- run in single-job mode (no
-j 8
or/MP
, nojom.exe
or whatever - sorry I'm not too Windowsy :P). This should be a bit lighter on memory - try to add QML files one by one - maybe one specific QML file causes this? Maybe it contains some data which triggers the error?
- run in single-job mode (no
-
Thanks, waiting for the current build to finish, if its still an issue I will take your advice.
-
Ok the error has changed again, now:
C1001: An internal error has occurred in the compiler.
And it stopped on the resource file that contains files that I don't think are relevant:
<RCC> <qresource prefix="/"> <file>distribution_support/qt.conf</file> <file>sortexS_tr.ts</file> <file>sortexS_th.ts</file> <file>sortexS_es.ts</file> <file>sortexS_en.ts</file> <file>sortexS_ru.ts</file> <file>sortexS_fr.ts</file> <file>sortexS_it.ts</file> <file>sortexS_vi.ts</file> <file>sortexS_pt.ts</file> <file>sortexS_kr.ts</file> <file>sortexS_xx.ts</file> <file>sortexS_xy.ts</file> <file>malgun.ttf</file> <file>runui.bat</file> </qresource> </RCC>
-
How heavy are these images ?
How big is these files ? -
@SGaist Hi, sorry can you explain by heavy to you mean how big are the file size's? They are all quite small, typical icon size's and mostly png's.
-
Yes, I meant their size.
-
@SGaist , The dimensions of the images again are icon sizes's so all quite small, they're is just a lot of them.
-
Ok, so nothing really unusual. How big are the generated cpp files ?
-
Total six of the project folder excluding objects and executable is 28MB, 882 Files.
-
Sorry, I meant the cpp files generated by rcc.
-