Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: Oleg_Sam on October 18, 2012, 12:35:51 pm

Title: Compiler error when build DoxyBlocks plugin
Post by: Oleg_Sam on October 18, 2012, 12:35:51 pm
When i build nigtly 8461 the compiller errors issue when build DoxyBlocks plugin

Compiling: DoxyBlocks.cpp
G:\GccTools\Projects\wx_widgets_projects\CodeBlocks\trunk\src\plugins\contrib\DoxyBlocks\DoxyBlocks.cpp: In member function 'virtual void DoxyBlocks::BuildMenu(wxMenuBar*)':
G:\GccTools\Projects\wx_widgets_projects\CodeBlocks\trunk\src\plugins\contrib\DoxyBlocks\DoxyBlocks.cpp:477: error: invalid static_cast from type '<unresolved overloaded function type>' to type 'void (wxEvtHandler::*)(wxCommandEvent&)'
G:\GccTools\Projects\wx_widgets_projects\CodeBlocks\trunk\src\plugins\contrib\DoxyBlocks\DoxyBlocks.cpp: In member function 'virtual bool DoxyBlocks::BuildToolBar(wxToolBar*)':
G:\GccTools\Projects\wx_widgets_projects\CodeBlocks\trunk\src\plugins\contrib\DoxyBlocks\DoxyBlocks.cpp:548: error: invalid static_cast from type '<unresolved overloaded function type>' to type 'void (wxEvtHandler::*)(wxCommandEvent&)'
Process terminated with status 1 (0 minutes, 31 seconds)
2 errors, 0 warnings (0 minutes, 31 seconds)

I am using WxWidgets 2.8.12, and TDM GCC-4.4.1  compiler
So I can't build this plugin  :(
Previous nigthly 8442 build OK
Thanks.   
Title: Re: Compiler error when build DoxyBlocks plugin
Post by: MortenMacFly on October 18, 2012, 01:34:58 pm
When i build nigtly 8461 the compiller errors issue when build DoxyBlocks plugin
Although this seems to me like a compiler issue (notice there are two functions called "Configure" but have a different signature) you can fix it in your local copy as following:

1.) Rename the method "void Configure(wxCommandEvent & event)" in the header and source file to something like "void OnConfigure(wxCommandEvent & event)"

2.) Adjust line DoxyBlocks.cpp:477 and DoxyBlocks.cpp:548 accordingly.
Title: Re: Compiler error when build DoxyBlocks plugin
Post by: ouch on October 18, 2012, 10:42:59 pm
I would suggest updating tdm-mingw first. I have a similar setup but I'm using tdm-mingw 4.6.1 and I did not receive any errors. (actually it seems I should follow my own advice as I see they are in the 4.7's now...)
Title: Re: Compiler error when build DoxyBlocks plugin
Post by: Oleg_Sam on October 19, 2012, 07:51:54 am
I update my tdm gcc to 4.6.1 and all builds OK.  :)
Thanks All.
Title: Re: Compiler error when build DoxyBlocks plugin
Post by: SharkCZ on October 24, 2012, 04:12:00 pm
The attached path makes it compile on RHEL-6 with gcc 4.4
Title: Re: Compiler error when build DoxyBlocks plugin
Post by: Jenna on October 24, 2012, 06:05:43 pm
The attached path makes it compile on RHEL-6 with gcc 4.4
A similar fix was committed yesterday by MoirtenMacFly in svn r8469.
Title: Re: Compiler error when build DoxyBlocks plugin
Post by: SharkCZ on October 25, 2012, 02:18:03 pm
The attached path makes it compile on RHEL-6 with gcc 4.4
A similar fix was committed yesterday by MoirtenMacFly in svn r8469.

Ah, thanks, I'm quite busy and my patch was sitting in my queue for a day or two.