Author Topic: Compile Error in wxSmith with wx311  (Read 5348 times)

Offline ouch

  • Almost regular
  • **
  • Posts: 223
Compile Error in wxSmith with wx311
« on: August 04, 2016, 12:01:35 am »
Codeblocks itself compiles fine, but I'm getting compile errors when I try to compile the contrib plugins with wxWidgets trunk. (version 311) Specifically it errors on wxSmith.

So is codeblocks not yet compliant with wx311 and is wx30 only for now?

Log is below:
Code
i686-w64-mingw32-g++.exe -Wall -O2 -pipe -mthreads -fmessage-length=0 -fexceptions -std=gnu++11 -DHAVE_W32API_H -D__WXMSW__ -DWXUSINGDLL -DcbDEBUG -DNOPCH -DBUILDING_PLUGIN -DwxUSE_UNICODE -IC:\Programming\wxWidgets\wxWidgets\lib\gcc_dll\mswu -IC:\Programming\wxWidgets\wxWidgets\include -I..\..\..\include -I..\..\..\include\tinyxml -I..\..\..\sdk\wxscintilla\include -I..\..\..\include\scripting\include -I..\..\..\include\scripting\squirrel -I..\..\..\include\scripting\sqplus -I..\..\..\include\scripting\bindings -I..\..\..\include\mozilla_chardet -I..\..\..\include\mozilla_chardet\mfbt -I..\..\..\include\mozilla_chardet\nsprpub\pr\include -I..\..\..\include\mozilla_chardet\xpcom -I..\..\..\include\mozilla_chardet\xpcom\base -I..\..\..\include\mozilla_chardet\xpcom\glue -c C:\Programming\codeblocks\src\plugins\contrib\wxSmith\wxwidgets\properties\wxsimagecomboeditordlg.cpp -o ..\..\..\.objs30\plugins\contrib\wxSmithLib\wxwidgets\properties\wxsimagecomboeditordlg.o
C:\Programming\codeblocks\src\plugins\contrib\wxSmith\wxwidgets\properties\wxscolourproperty.cpp:208:87: error: 'Choice' has not been declared
                                    wxColourPropertyValue,const wxColourPropertyValue&,Choice)
                                                                                       ^
C:\Programming\codeblocks\src\plugins\contrib\wxSmith\wxwidgets\properties\wxscolourproperty.cpp:211:5: error: expected constructor, destructor, or type conversion before 'void'
     void wxsMyColourPropertyClass::Init( int type, const wxColour& colour )
     ^
C:\Programming\codeblocks\src\plugins\contrib\wxSmith\wxwidgets\properties\wxscolourproperty.cpp: In member function 'virtual void {anonymous}::wxsMyColourPropertyClass::OnCustomPaint(wxDC&, const wxRect&, wxPGPaintData&)':
C:\Programming\codeblocks\src\plugins\contrib\wxSmith\wxwidgets\properties\wxscolourproperty.cpp:726:64: warning: 'wxBrush::wxBrush(const wxColour&, int)' is deprecated: use wxBRUSHSTYLE_XXX constants [-Wdeprecated-declarations]
             dc.SetBrush(wxBrush(*wxBLACK,wxHATCHSTYLE_BDIAGONAL));
                                                                ^
i686-w64-mingw32-g++.exe -Wall -O2 -pipe -mthreads -fmessage-length=0 -fexceptions -std=gnu++11 -DHAVE_W32API_H -D__WXMSW__ -DWXUSINGDLL -DcbDEBUG -DNOPCH -DBUILDING_PLUGIN -DwxUSE_UNICODE -IC:\Programming\wxWidgets\wxWidgets\lib\gcc_dll\mswu -IC:\Programming\wxWidgets\wxWidgets\include -I..\..\..\include -I..\..\..\include\tinyxml -I..\..\..\sdk\wxscintilla\include -I..\..\..\include\scripting\include -I..\..\..\include\scripting\squirrel -I..\..\..\include\scripting\sqplus -I..\..\..\include\scripting\bindings -I..\..\..\include\mozilla_chardet -I..\..\..\include\mozilla_chardet\mfbt -I..\..\..\include\mozilla_chardet\nsprpub\pr\include -I..\..\..\include\mozilla_chardet\xpcom -I..\..\..\include\mozilla_chardet\xpcom\base -I..\..\..\include\mozilla_chardet\xpcom\glue -c C:\Programming\codeblocks\src\plugins\contrib\wxSmith\wxwidgets\properties\wxsimagecomboproperty.cpp -o ..\..\..\.objs30\plugins\contrib\wxSmithLib\wxwidgets\properties\wxsimagecomboproperty.o
In file included from C:\Programming\wxWidgets\wxWidgets\include/wx/brush.h:73:0,
                 from C:\Programming\wxWidgets\wxWidgets\include/wx/dc.h:24,
                 from C:\Programming\wxWidgets\wxWidgets\include/wx/dcclient.h:12,
                 from C:/Programming/codeblocks/src/plugins/contrib/wxSmith/properties/wxsproperty.h:31,
                 from C:/Programming/codeblocks/src/plugins/contrib/wxSmith/properties/wxsproperties.h:8,
                 from C:\Programming\codeblocks\src\plugins\contrib\wxSmith\wxwidgets\properties\wxscolourproperty.h:26,
                 from C:\Programming\codeblocks\src\plugins\contrib\wxSmith\wxwidgets\properties\wxscolourproperty.cpp:23:
C:\Programming\wxWidgets\wxWidgets\include/wx/msw/brush.h:44:5: note: declared here
     wxBrush(const wxColour& col, int style);
     ^
C:\Programming\codeblocks\src\plugins\contrib\wxSmith\wxwidgets\properties\wxscolourproperty.cpp: In member function 'virtual bool {anonymous}::wxsMyColourPropertyClass::StringToValue(wxVariant&, const wxString&, int) const':
C:\Programming\codeblocks\src\plugins\contrib\wxSmith\wxwidgets\properties\wxscolourproperty.cpp:785:32: error: 'ResetNextIndex' was not declared in this scope
                 ResetNextIndex();

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Compile Error in wxSmith with wx311
« Reply #1 on: August 04, 2016, 12:40:43 am »
Codeblocks itself compiles fine, but I'm getting compile errors when I try to compile the contrib plugins with wxWidgets trunk. (version 311) Specifically it errors on wxSmith.

So is codeblocks not yet compliant with wx311 and is wx30 only for now?

It has been a few months since I lasted tried to Compile C::B with wx3.1; but, I had to enable wx2.8 compatible mode to get it any where close to compiling. On Windows, I suggest using wx2.8.12 and on Linux I suggest wx2.8.12 or wx3.0.2.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline ouch

  • Almost regular
  • **
  • Posts: 223
Re: Compile Error in wxSmith with wx311
« Reply #2 on: August 04, 2016, 01:05:33 am »
Unfortunately wxWidgets 2.8 doesn't seem to compile with the latest compilers like Mingw64 5.3.0. So I was hoping I could just jump to the latest version of wxWidgets and be fine.

Is CB version wx30 still really buggy though? I thought it was mostly fixed.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Compile Error in wxSmith with wx311
« Reply #3 on: August 04, 2016, 02:25:13 am »
On Linux, it is mostly fixed to use wx3.0; on Windows, it is NOT really being tested with anything except wx2.8.12 in building Code::Blocks. Edit: The building of Code::Blocks using wx3.0 works great; but, the running of that binary has NOT been tested a lot; but, it might work great. Since there has been a lot of Linux wx3.0 fixes since I last tried it.

Tim S.
« Last Edit: August 04, 2016, 02:29:30 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Compile Error in wxSmith with wx311
« Reply #4 on: August 04, 2016, 05:07:11 pm »
If you still want to build C::B using wx3.1, then make sure in setup.h that WXWIN_COMPATIBILITY_2_8=1 instead of the default zero and you are more likely to get it built.

This is what I meant by having wx2.8 compatible mode enabled.

If using wx version control repo, You will need to copy "include/wx/msw/setup0.h" to "include/wx/msw/setup.h".

You need to edit "include/wx/msw/setup.h" to have "#define WXWIN_COMPATIBILITY_2_8 1".

Edit: Delete "lib/gcc_dll/mswu/wx/setup.h"; it does NOT overwrite normally by default.

Then, build wxWidgets; and, after building verify the "lib/gcc_dll/mswu/wx/setup.h" has "#define WXWIN_COMPATIBILITY_2_8 1".

Tim S.
« Last Edit: August 04, 2016, 05:23:34 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline ouch

  • Almost regular
  • **
  • Posts: 223
Re: Compile Error in wxSmith with wx311
« Reply #5 on: August 05, 2016, 12:28:04 am »
Ok, I'll try to give it a shot sometime next week.