Author Topic: Compiler error when build DoxyBlocks plugin  (Read 10561 times)

Offline Oleg_Sam

  • Multiple posting newcomer
  • *
  • Posts: 30
Compiler error when build DoxyBlocks plugin
« 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.   

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Compiler error when build DoxyBlocks plugin
« Reply #1 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.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline ouch

  • Almost regular
  • **
  • Posts: 223
Re: Compiler error when build DoxyBlocks plugin
« Reply #2 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...)

Offline Oleg_Sam

  • Multiple posting newcomer
  • *
  • Posts: 30
Re: Compiler error when build DoxyBlocks plugin
« Reply #3 on: October 19, 2012, 07:51:54 am »
I update my tdm gcc to 4.6.1 and all builds OK.  :)
Thanks All.

Offline SharkCZ

  • Almost regular
  • **
  • Posts: 131
Re: Compiler error when build DoxyBlocks plugin
« Reply #4 on: October 24, 2012, 04:12:00 pm »
The attached path makes it compile on RHEL-6 with gcc 4.4
Code::Blocks package maintainer for Fedora and EPEL

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Compiler error when build DoxyBlocks plugin
« Reply #5 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.

Offline SharkCZ

  • Almost regular
  • **
  • Posts: 131
Re: Compiler error when build DoxyBlocks plugin
« Reply #6 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.
Code::Blocks package maintainer for Fedora and EPEL