Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
Build C::B against wx3.02 with gcc 5.2 under Windows
ollydbg:
Since the MinGW-Build GCC 5.2 is the only GCC which support large PCH files(see details in good news about gcc which support large pch), I would give it a try.
I have download the wxWidgets 3.0.2 release, and follow the steps described in wiki: Compiling wxWidgets 3.0.0 to develop Code::Blocks (MSW) - CodeBlocks
It fails in the first step when building wx3.0.2 with the following errors:
--- Code: ---...
ranlib ..\..\lib\gcc_dll\libwxscintilla.a
g++ -c -o gcc_mswudll\monodll_dummy.o -O2 -mthreads -DHAVE_W32API_H -D__WXMSW__ -DNDEBUG -D_UNICODE -I..\..\lib\gcc_dll\mswu -I..\..\include -W -Wall -DWXBUILDING -I..\..\src\tiff\libtiff -I..\..\src\jpeg -I..\..\src\png -I..\..\src\zlib -I..\..\src\regex -I..\..\src\expat\lib -I..\..\src\stc\scintilla\include -I..\..\src\stc\scintilla\lexlib -I..\..\src\stc\scintilla\src -D__WX__ -DSCI_LEXER -DLINK_LEXERS -DwxUSE_BASE=1 -DWXMAKINGDLL -Wno-ctor-dtor-privacy -fno-keep-inline-dllexport -MTgcc_mswudll\monodll_dummy.o -MFgcc_mswudll\monodll_dummy.o.d -MD -MP ../../src/common/dummy.cpp
g++ -c -o gcc_mswudll\monodll_any.o -O2 -mthreads -DHAVE_W32API_H -D__WXMSW__ -DNDEBUG -D_UNICODE -I..\..\lib\gcc_dll\mswu -I..\..\include -W -Wall -DWXBUILDING -I..\..\src\tiff\libtiff -I..\..\src\jpeg -I..\..\src\png -I..\..\src\zlib -I..\..\src\regex -I..\..\src\expat\lib -I..\..\src\stc\scintilla\include -I..\..\src\stc\scintilla\lexlib -I..\..\src\stc\scintilla\src -D__WX__ -DSCI_LEXER -DLINK_LEXERS -DwxUSE_BASE=1 -DWXMAKINGDLL -Wno-ctor-dtor-privacy -fno-keep-inline-dllexport -MTgcc_mswudll\monodll_any.o -MFgcc_mswudll\monodll_any.o.d -MD -MP ../../src/common/any.cpp
In file included from E:/code/gcc/i686-5.2.0-release-posix-dwarf-rt_v4-rev0/mingw32/i686-w64-mingw32/include/c++/type_traits:35:0,
from ..\..\include/wx/strvararg.h:25,
from ..\..\include/wx/string.h:46,
from ..\..\include/wx/any.h:19,
from ../../src/common/any.cpp:18:
E:/code/gcc/i686-5.2.0-release-posix-dwarf-rt_v4-rev0/mingw32/i686-w64-mingw32/include/c++/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
#error This file requires compiler and library support for the \
^
In file included from ..\..\include/wx/string.h:46:0,
from ..\..\include/wx/any.h:19,
from ../../src/common/any.cpp:18:
..\..\include/wx/strvararg.h:350:18: error: 'is_enum' in namespace 'std' does not name a template type
typedef std::is_enum<T> is_enum;
^
..\..\include/wx/strvararg.h:354:54: error: 'is_enum' was not declared in this scope
enum { value = wxFormatStringSpecifierNonPodType<is_enum::value>::value };
^
..\..\include/wx/strvararg.h:354:68: error: template argument 1 is invalid
enum { value = wxFormatStringSpecifierNonPodType<is_enum::value>::value };
^
makefile.gcc:6428: recipe for target 'gcc_mswudll\monodll_any.o' failed
mingw32-make: *** [gcc_mswudll\monodll_any.o] Error 1
--- End code ---
Do I need to enable the c++11 command line option? Any one has experience about building wx 3.0.2? Thanks.
BTW: It looks like c++11 option is not suggested, see: Trouble using wxWidgets 3.0.2 library under Mingw 64, instread, they suggest "gnu++11" option.
Thanks.
ollydbg:
It looks like that this issue has discussed in wx user forum, see: https://groups.google.com/d/msg/wx-users/jZNzDXXnjCs/AQB3MB6HogEJ
And the actual fix is in trunk: Don't attempt using <type_traits> with g++ 4.9.2 in C++98 mode. ยท wxWidgets/wxWidgets@4f846f7
So, this patch need to be applied on the wxWidgets 3.0.2 release. :)
ollydbg:
The patch file can be generated by adding a ".patch" in the URL, so here is the patch:
https://github.com/wxWidgets/wxWidgets/commit/4f846f72de.patch
EDIT: with this patch, I can successfully build wx 3.0.2 with gcc 5.2 by the method mentioned in wiki: Compiling wxWidgets 3.0.0 to develop Code::Blocks (MSW) - CodeBlocks
Now, I'm going to see if I can build CB against wx 3.0.2 with PCH enabled, see related discussion here: Re: Patches for Compiling Code::Blocks against wxWidgets 3.0 using MinGW GCC 4.8.1
ollydbg:
OK, successfully build CodeBlocks_wx30.cbp with PCH enabled (under gcc 5.2).
I use my patch to build C::B against wx 3.0 with PCH enabled to CodeBlocks_wx30.cbp
Besides that, I have add an compiler option:
--- Code: ----Wno-deprecated-declarations
--- End code ---
to avoid a lot of warnings from wx.
Also, I see some warnings from C::B source:
--- Code: ----------------- Build: sdk in Code::Blocks wx3.0.x (compiler: GNU GCC Compiler)---------------
[ 0.8%] g++.exe -Wall -g -pipe -mthreads -fmessage-length=0 -fexceptions -Winvalid-pch -Wno-deprecated-declarations -DHAVE_W32API_H -D__WXMSW__ -DWXUSINGDLL -DcbDEBUG -DCB_PRECOMP -DWX_PRECOMP -DwxUSE_UNICODE -Woverloaded-virtual -DEXPORT_LIB -DEXPORT_EVENTS -DWXMAKINGDLL_SCI -iquote.objs30\include -I.objs30\include -I. -ID:\wx3\include -ID:\wx3\lib\gcc_dll\mswu -Isdk\wxscintilla\include -Iinclude\tinyxml -Iinclude -Iinclude\tinyxml -Iinclude\scripting\bindings -Iinclude\scripting\include -Iinclude\scripting\sqplus -Iinclude\mozilla_chardet -Iinclude\mozilla_chardet\mfbt -Iinclude\mozilla_chardet\nsprpub\pr\include -Iinclude\mozilla_chardet\xpcom -Iinclude\mozilla_chardet\xpcom\base -Iinclude\mozilla_chardet\xpcom\glue -c include\sdk_precomp.h -o .objs30\include\sdk_precomp.h.gch
In file included from include\cbauibook.h:13:0,
from include\sdk_common.h:133,
from include\sdk_precomp.h:13:
D:\wx3\include/wx/aui/auibook.h:349:18: warning: 'virtual bool wxAuiNotebook::AddPage(wxWindow*, const wxString&, bool, int)' was hidden [-Woverloaded-virtual]
virtual bool AddPage(wxWindow *page, const wxString &text, bool select,
^
In file included from include\sdk_common.h:133:0,
from include\sdk_precomp.h:13:
include\cbauibook.h:141:14: warning: by 'bool cbAuiNotebook::AddPage(wxWindow*, const wxString&, bool, const wxBitmap&)' [-Woverloaded-virtual]
bool AddPage(wxWindow* page,
^
In file included from include\cbauibook.h:13:0,
from include\sdk_common.h:133,
from include\sdk_precomp.h:13:
D:\wx3\include/wx/aui/auibook.h:352:18: warning: 'virtual bool wxAuiNotebook::InsertPage(size_t, wxWindow*, const wxString&, bool, int)' was hidden [-Woverloaded-virtual]
virtual bool InsertPage(size_t index, wxWindow *page, const wxString &text,
^
In file included from include\sdk_common.h:133:0,
from include\sdk_precomp.h:13:
include\cbauibook.h:156:14: warning: by 'bool cbAuiNotebook::InsertPage(size_t, wxWindow*, const wxString&, bool, const wxBitmap&)' [-Woverloaded-virtual]
bool InsertPage(size_t page_idx,
^
--- End code ---
Maybe, we need to fix our C::B's source :)
ollydbg:
After finishing building CodeBlocks_wx30.cbp and running update30.bat, I just start C::B inside C::B.
The first thing I see is a dialog from wx, says
--- Quote ---15:23:36: Resource files must have same version number.
15:23:38: Resource files must have same version number.
--- End quote ---
I think I have reported some where in this forum, but it is lost...
Navigation
[0] Message Index
[#] Next page
Go to full version