The precompiled header that is created is extremely large (about 300 Mb) and as a result cc1plus.exe is crashing during a build.
To investigate the problem I have created a new project with an empty pch-file:
Code: Select all
#ifndef WX_PCH_H_INCLUDED #define WX_PCH_H_INCLUDED // basic wxWidgets headers #include <wx/wxprec.h> #ifndef WX_PRECOMP #include <wx/wx.h> #endif #ifdef WX_PRECOMP // put here all your rarely-changing header files #endif // WX_PRECOMP #endif // WX_PCH_H_INCLUDED
How is it possible that an empty (default) header file creates such a large compiled file?
The command that is used to create the file is:
g++.exe -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -Winvalid-pch -include wx_pch.h -DWX_PRECOMP -Wall -O2 -IC:\wxWidgets-3.1.2\include -IC:\wxWidgets-3.1.2\lib\gcc_dll\mswu -c c:\dev\pch_test\wx_pch.h -o wx_pch.h.gch\Release_wx_pch_h_gch
I am using wxWidgets version 3.1.2 on Windows 8.1
The development environment is Code:Blocks with minGW (using GCC 8.2)