Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

compile issue with wx 3.1.6

(1/3) > >>

When I update my wx into latest 3.1.6 version, codeblocks could not be compiled any more, because a c++ issue:

--- Code: ---n file included from /usr/include/wx-3.1/wx/wx.h:24,
                 from /usr/include/wx-3.1/wx/wxprec.h:42,
                 from ../../../src/include/sdk_common.h:24,
                 from ../../../src/include/sdk_precomp.h:13:
/usr/include/wx-3.1/wx/event.h: In instantiation of 'constexpr auto wxPrivate::DoCast(void (C::*)(E&)) [with E = wxHtmlLinkEvent; C = CCManager]':
../../../src/sdk/ccmanager.cpp:290:22:   required from here
/usr/include/wx-3.1/wx/event.h:157:12: error: 'wxEvtHandler' is an inaccessible base of 'CCManager'
  157 |     return static_cast<void (wxEvtHandler::*)(E&)>(pmf);
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--- End code ---

But, the CCManager DO is the child class of wxEvtHandler. How to fix this compile issue?
/usr/include/wx-3.1/wx/event.h:157:12: note:    in pointer to member function conversion

Are you using the latest SVN trunc code?
If yes, when did you grab the code?
If not try the very latest CF SVN code as it has changes for 3.1.6 from a few weeks ago.

If the latest truck codes  does not help , then comi9ler are you using? Version and the URL you used to download it from?

When did you grab the 3.1.6 Github sources to do the build?

I think it should be.
I always keep it fresh from and from its latest commit log, its equal as svn 12529.
and my OS is ArchLinux, gcc version 11.1.0

Miguel Gimenez:
Works OK with C::B trunk, wxWidgets head and MinGW 8.1 on MSW.

EDIT: may be related to this bug in GCC. Also related to this wxWidgets ticket, fixed 5 years ago.


--- Quote ---The default mode for C++ is now -std=gnu++17 instead of -std=gnu++14.
--- End quote ---

You might be having this new issue because of the default change.

I would try using "-std=gnu++14" to see if that fixes the issue.

Tim S.


[0] Message Index

[#] Next page

Go to full version