Compiling code using custom Precompiled Headers
I am trying to reduce the compilation time of my c++ codes that use a custom header that includes around 10 headers (vector, regex, windows.h, and some other custom ones). I am using MinGW 5.0.4, with GCC v8.1. The custom header has a good amount of declarations and inclusions of some other headers that are not precompiled. This leads to a 5-6 second increase in compilation time, even for codes as short as : #include "My_Custom_Header.h" int main() { } Now, I tried searching on the net for solutions and found that one can precompile headers using g++ and then these extra compilations will not take place (useful for cases where the header does not change at all, otherwise I would require a makefile). When I compiled the header, a 184MB .gch file was generated, which is the result of compiling the header. But now, whenever I compile the c++ source, I get an error : "cc1plus.exe has stopped working" I found this link which indicates that this error is due to the extremely large .gch file: https://stackoverflow.com/questions/10841306/cc1plus-exe-crash-when-using-large-precompiled-header-file I tried to solve the issue using OllyDbg as indicated, but it fails to load the cc1plus.exe. Is there another software I can use instead of OllyDbg? How can I remove the error? If this issue is unresolvable, is there another way to reduce the compilation time?