Page 1 of 1

wxOVERRIDE compile problem

Posted: Wed Jul 10, 2019 5:52 am
by mrdebug
Hi.
After having formatted my pc and installed Debian 10 now I trying to compile my wxWidgets project.
So the project uses wxFreeChart. Trying to compile wxFreeChart I obtain this error:

Code: Select all

./include/wx/axis/axis.h:410:33: error: ‘wxOVERRIDE’ does not name a type; did you mean ‘wxEVT_IDLE’?
     virtual bool UpdateBounds() wxOVERRIDE;
                                 ^~~~~~~~~~
                                 wxEVT_IDLE
Have I forget to install some package?
Are you using the standard Debian wxWidgets packages or are you using a particular wxWidgets repository?

Re: wxOVERRIDE compile problem

Posted: Wed Jul 10, 2019 12:24 pm
by DavidHart
Hi,
Are you using the standard Debian wxWidgets packages or are you using a particular wxWidgets repository?
Are you asking yourself that question?

Perhaps you should. wxOverride is new in wx3.1 so if you are building with <wx3.1 you'll need to #define it yourself.

Regards,

David

Re: wxOVERRIDE compile problem

Posted: Wed Jul 10, 2019 12:28 pm
by mrdebug
Oh, maybe Debian 10 has got wsWidgets ver 3.0.

Re: wxOVERRIDE compile problem

Posted: Wed Jul 10, 2019 2:21 pm
by DavidHart
Oh, maybe Debian 10 has got wxWidgets ver 3.0.
Why not check? In a terminal do:
wx-config --version

Re: wxOVERRIDE compile problem

Posted: Sat Jul 13, 2019 6:51 am
by mrdebug
Solved using this reppository:

# wxWidgets 3.1 Packages and Repositories
deb http://repos.codelite.org/wx3.1.2/debian/ buster libs

Re: wxOVERRIDE compile problem

Posted: Sat Nov 12, 2022 10:54 pm
by EnriqueDavis
Para todos los ejemplos, incluyendo "minimal.cpp" tenía ERROR al compilar con wxWidgets 3.0 tipo "error: expected ‘;’ at end of member declaration virtual bool OnInit() wxOVERRIDE". Para actualizar a versión 3.1.2 usé lo indicado en https://docs.wxwidgets.org/3.1.5/overview_install.html :
sudo apt-get install libwxgtk3.1-dev
tras lo cual he podido compilar y correr sin problemas los ejemplos "minimal.cpp" y "calendar.cpp".
Linux 5.10.0-19-amd64 #1 SMP Debian 5.10.149-2 (2022-10-21) x86_64 GNU/Linux.

DeepL translation:
For all examples, including "minimal.cpp" I had ERROR when compiling with wxWidgets 3.0 type "error: expected ';' at end of member declaration virtual bool declaration OnInit() wxOVERRIDE". To upgrade to version 3.1.2 I used the following at https://docs.wxwidgets.org/3.1.5/overview_install.html :
sudo apt-get install libwxgtk3.1-dev
after which I was able to compile and run the "minimal.cpp" and "calendar.cpp" examples without problems.
Linux 5.10.0-19-amd64 #1 SMP Debian 5.10.149-2 (2022-10-21) x86_64 GNU/Linux.

Translated with www.DeepL.com/Translator (free version)