Author Topic: wxLedPanel compilation problem with wxWidgets 3.1.4 (wx-master)  (Read 1144 times)

Offline gd_on

  • Lives here!
  • ****
  • Posts: 578
When I try to compile C::B with wx-master (wxWidgets 3.1.4), I have a compilation error within the contrib plugin wxLEDPanel.
The problem is at line 361 in wxledpanel.cpp. Probably linked to recent changes in wxanimation.
It can be solved by not declaring wxAnimation as const.
See proposed patch.
Nevertheless, I'm not sure it's the best solution.
Windows 10 64 bits (20.04), svn C::B (last version or almost!), wxWidgets 3.1.4, Msys2 Compilers 10.2.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\msys64\mingw64) or 32 bits (sjlj, posix in C:\msys64\mingw32).

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6996
    • My Best Post
Re: wxLedPanel compilation problem with wxWidgets 3.1.4 (wx-master)
« Reply #1 on: April 10, 2020, 09:34:27 pm »
I am guessing this is the git commit you are talking about:

Code: [Select]
commit 902a2f08859a0d912aff0562cdaea5a63560124a
Author: Paul Cornett <[email protected]>
Date:   Mon Apr 6 20:26:49 2020 -0700

    Remove wxAnimation copy ctor and copy-assignment operator implementations

    The compiler-generated defaults will do the same thing

Edit: Looks like there was a very long list of wxAnimation changes right before this most recent change.

Tim S.
« Last Edit: April 10, 2020, 09:37:40 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12828
    • Travis build status
Re: wxLedPanel compilation problem with wxWidgets 3.1.4 (wx-master)
« Reply #2 on: April 11, 2020, 12:11:20 am »
Probably someone should report it :)
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6996
    • My Best Post
Re: wxLedPanel compilation problem with wxWidgets 3.1.4 (wx-master)
« Reply #3 on: April 11, 2020, 01:34:10 am »
Adding compiler option "-fpermissive" made it avoid the error.

We really need someone who uses the code to test to verify any possible fix.

This is the line with the problem for me.
Code: [Select]
m_content_mo.Init(ani.GetFrame(0));

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

Offline gd_on

  • Lives here!
  • ****
  • Posts: 578
Re: wxLedPanel compilation problem with wxWidgets 3.1.4 (wx-master)
« Reply #4 on: April 11, 2020, 09:46:12 am »
OK. Same line for me (line 361 as told in my 1st post).
There were a lot of modifications in wxAnimation, introduced with the last git branch merge (07/04/2020). It's not only the very last modification concerning ctor, dtor ... which introduced this behaviour.
The -fpermissive flag is effectively suggested by the error code, but as wxledpanel is in a pack of plugins compiled together, I suppose that you put it at a relatively high level. So this flag affects also other plugins I suppose. Could it be a future source of problems ?

gd_on
« Last Edit: April 11, 2020, 09:51:09 am by gd_on »
Windows 10 64 bits (20.04), svn C::B (last version or almost!), wxWidgets 3.1.4, Msys2 Compilers 10.2.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\msys64\mingw64) or 32 bits (sjlj, posix in C:\msys64\mingw32).

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6996
    • My Best Post
Re: wxLedPanel compilation problem with wxWidgets 3.1.4 (wx-master)
« Reply #5 on: April 12, 2020, 02:43:40 pm »
Possible solution is to change

Code: [Select]
m_content_mo.Init(ani.GetFrame(0));
to

Code: [Select]
m_content_mo.Init(m_ani.GetFrame(0));

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

Offline Miguel Gimenez

  • Lives here!
  • ****
  • Posts: 552
Re: wxLedPanel compilation problem with wxWidgets 3.1.4 (wx-master)
« Reply #6 on: April 12, 2020, 06:34:06 pm »
The constness of GetFrame() has just been restored in wxTrunk, so there is no need to change wxLedPanel's code.

Commit: https://github.com/wxWidgets/wxWidgets/commit/ed077e17cff6aa823c9547d3052a089f3789bd7e
Ticket: https://trac.wxwidgets.org/ticket/18725

Offline gd_on

  • Lives here!
  • ****
  • Posts: 578
I have seen that this morning. Looks OK.
Original C::B code works again. Cool  8)
Windows 10 64 bits (20.04), svn C::B (last version or almost!), wxWidgets 3.1.4, Msys2 Compilers 10.2.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\msys64\mingw64) or 32 bits (sjlj, posix in C:\msys64\mingw32).