News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Compiler error when build DoxyBlocks plugin

Started by Oleg_Sam, October 18, 2012, 12:35:51 PM

Previous topic - Next topic

Oleg_Sam

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.   

MortenMacFly

Quote from: Oleg_Sam on October 18, 2012, 12:35:51 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: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

ouch

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...)

Oleg_Sam

I update my tdm gcc to 4.6.1 and all builds OK.  :)
Thanks All.

SharkCZ

The attached path makes it compile on RHEL-6 with gcc 4.4
Code::Blocks package maintainer for Fedora and EPEL

Jenna

Quote from: SharkCZ on October 24, 2012, 04:12:00 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.

SharkCZ

Quote from: jens on October 24, 2012, 06:05:43 PM
Quote from: SharkCZ on October 24, 2012, 04:12:00 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