天天看點

qt解決cc1plus.exe: error: out of memory allocating

原文位址::https://blog.csdn.net/liukang325/article/details/53159446

相關文章

1、cc1plus.exe:-1:error:out of memory如何解決?----https://jingyan.baidu.com/article/ff41162577655853e5823719.html

QT中增加資源檔案過大時,會編譯不過,報錯:

cc1plus.exe: out of memory allocating 1073745919 bytes

1

使用qrc資源檔案,也就是在QT的工程中添加資源檔案,就是添加的資源檔案(如qrc.cpp)會直接被存放到靜态數組中,進而一直占用記憶體,使記憶體的使用率不高。有的時候如果資源過大,可能編譯都無法通過,會造成out of memory的錯誤。

解決方法:

在工程PRO檔案中,添加:

CONFIG += resources_big

————————————————

版權聲明:本文為CSDN部落客「陽光檸檬_」的原創文章,遵循CC 4.0 BY-SA版權協定,轉載請附上原文出處連結及本聲明。

原文連結:https://blog.csdn.net/liukang325/article/details/53159446