The patch I am testing. I do NOT think "src/include/xtra_res.h" needs patched.
But, I am only testing with that for now; looking for compile errors because "wx/wxprec.h" was NOT included.
If I don't find any I will test the patch without changing "src/include/xtra_res.h".
Tim S.
Index: src/CodeBlocks_wx30.cbp
===================================================================
--- src/CodeBlocks_wx30.cbp (revision 9615)
+++ src/CodeBlocks_wx30.cbp (working copy)
@@ -731,7 +731,7 @@
<Add option="-D__WXMSW__" />
<Add option="-DWXUSINGDLL" />
<Add option="-DcbDEBUG" />
- <Add option="-DNOPCH" />
+ <Add option="-DCB_PRECOMP" />
<Add option="-DwxUSE_UNICODE" />
<Add directory="$(#WX30.include)" />
<Add directory="$(#WX30.lib)/gcc_dll$(WX_CFG)/msw$(WX_SUFFIX)" />
@@ -1280,6 +1280,7 @@
<Option target="sdk" />
</Unit>
<Unit filename="include/sdk.h">
+ <Option compile="1" />
<Option weight="1" />
<Option target="src" />
</Unit>
@@ -1290,6 +1291,7 @@
<Option target="sdk" />
</Unit>
<Unit filename="include/sdk_precomp.h">
+ <Option compile="1" />
<Option weight="0" />
<Option target="sdk" />
</Unit>
Index: src/include/sdk_common.h
===================================================================
--- src/include/sdk_common.h (revision 9615)
+++ src/include/sdk_common.h (working copy)
@@ -28,16 +28,26 @@
#if ( defined(CB_PRECOMP) && !defined(WX_PRECOMP) )
#define WX_PRECOMP
+ #ifdef __MINGW32__
+ #if __GNUC__ == 4 && __GNUC_MINOR__ >= 8
+ #include <wx/version.h>
+ #if wxMAJOR_VERSION == 3
+ #undef WX_PRECOMP
+ #endif // wxMAJOR_VERSION
+ #endif // __GNUC__
+ #endif // __MINGW32__
#endif // CB_PRECOMP
// basic wxWidgets headers : this one itself will check for precompiled headers
// and if so will include a list of wx headers, at the bottom we add some more headers
// in the case of precompilation (note : some headers are in both lists)
// so even if NO CB_PRECOMP we can still have WX_PRECOMP turned on in this "wxprec" header
-#include <wx/wxprec.h>
+#ifdef WX_PRECOMP
+ #include <wx/wxprec.h>
-#ifdef __BORLANDC__
- #pragma hdrstop
+ #ifdef __BORLANDC__
+ #pragma hdrstop
+ #endif
#endif
#include "prep.h" // this is deliberately not inside the #ifdef block
Index: src/include/xtra_res.h
===================================================================
--- src/include/xtra_res.h (revision 9615)
+++ src/include/xtra_res.h (working copy)
@@ -6,16 +6,11 @@
#ifndef XTRA_RES_H
#define XTRA_RES_H
-#include <wx/wxprec.h>
#include <wx/xrc/xmlres.h>
#include <wx/xrc/xh_dlg.h>
#include <wx/toolbar.h>
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-
class wxXmlResourceHandler;
class wxToolBarAddOnXmlHandler : public wxXmlResourceHandler