News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

wxLedPanel compilation problem with wxWidgets 3.1.4 (wx-master)

Started by gd_on, April 10, 2020, 07:11:42 PM

Previous topic - Next topic

gd_on

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 11 64 bits (25H2), svn C::B (last version or almost!), wxWidgets 3.3.2, Msys2 Compilers 16.1.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\msys64\mingw64) or 32 bits (dwarf2, posix  in C:\msys64\mingw32).

stahta01

I am guessing this is the git commit you are talking about:

commit 902a2f08859a0d912aff0562cdaea5a63560124a
Author: Paul Cornett <paulcor@bullseye.com>
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.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

oBFusCATed

(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!]

stahta01

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.

m_content_mo.Init(ani.GetFrame(0));


Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

gd_on

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
Windows 11 64 bits (25H2), svn C::B (last version or almost!), wxWidgets 3.3.2, Msys2 Compilers 16.1.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\msys64\mingw64) or 32 bits (dwarf2, posix  in C:\msys64\mingw32).

stahta01

Possible solution is to change

m_content_mo.Init(ani.GetFrame(0));

to


m_content_mo.Init(m_ani.GetFrame(0));


Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

Miguel Gimenez


gd_on

I have seen that this morning. Looks OK.
Original C::B code works again. Cool  8)
Windows 11 64 bits (25H2), svn C::B (last version or almost!), wxWidgets 3.3.2, Msys2 Compilers 16.1.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\msys64\mingw64) or 32 bits (dwarf2, posix  in C:\msys64\mingw32).