j-jorge/bear

error: 'virtual bool wxEvtHandler::ProcessEvent(wxEvent&)' is inaccessible within this context

Closed this issue · 2 comments

when compiling bear-40f21582e3b4a93db9a9e8464bc97c9a0c9872ae on Fedora 28 with wxGTK3-devel-3.0.4-1.fc28.x86_64 fails:

cd /home/martin/rpmbuild/BUILD/bear-40f21582e3b4a93db9a9e8464bc97c9a0c9872ae/bear-factory/bear-editor/src/bf && /usr/lib64/ccache/c++  -DBEAR_FACTORY_TEXT_DOMAIN_PATH=/usr/share/locale -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -Dbear_editor_EXPORTS -I/home/martin/rpmbuild/BUILD/bear-40f21582e3b4a93db9a9e8464bc97c9a0c9872ae/bear-engine/common/include -I/home/martin/rpmbuild/BUILD/bear-40f21582e3b4a93db9a9e8464bc97c9a0c9872ae/bear-factory/bear-editor/src/bf/.. -isystem /usr/lib64/wx/include/gtk3-unicode-3.0 -isystem /usr/include/wx-3.0  -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -pthread -fPIC   -Wall -std=c++11 -pedantic -Wmissing-field-initializers -Wuninitialized '-DBF_IMAGES_PATH="/usr/share/bear-factory/images"' -o CMakeFiles/bear-editor.dir/code/accelerator_table.cpp.o -c /home/martin/rpmbuild/BUILD/bear-40f21582e3b4a93db9a9e8464bc97c9a0c9872ae/bear-factory/bear-editor/src/bf/code/accelerator_table.cpp
/home/martin/rpmbuild/BUILD/bear-40f21582e3b4a93db9a9e8464bc97c9a0c9872ae/bear-factory/bear-editor/src/bf/code/accelerator_table.cpp: In member function 'void bf::accelerator_table::on_key_pressed(wxKeyEvent&)':
/home/martin/rpmbuild/BUILD/bear-40f21582e3b4a93db9a9e8464bc97c9a0c9872ae/bear-factory/bear-editor/src/bf/code/accelerator_table.cpp:102:45: error: 'virtual bool wxEvtHandler::ProcessEvent(wxEvent&)' is inaccessible within this context
       m_event_handler.ProcessEvent( command );
                                             ^
In file included from /usr/include/wx-3.0/wx/window.h:18,
                 from /home/martin/rpmbuild/BUILD/bear-40f21582e3b4a93db9a9e8464bc97c9a0c9872ae/bear-factory/bear-editor/src/bf/../bf/accelerator_table.hpp:19,
                 from /home/martin/rpmbuild/BUILD/bear-40f21582e3b4a93db9a9e8464bc97c9a0c9872ae/bear-factory/bear-editor/src/bf/code/accelerator_table.cpp:14:
/usr/include/wx-3.0/wx/event.h:3355:18: note: declared here
     virtual bool ProcessEvent(wxEvent& event);
                  ^~~~~~~~~~~~
make[2]: *** [bear-factory/bear-editor/src/bf/CMakeFiles/bear-editor.dir/build.make:66: bear-factory/bear-editor/src/bf/CMakeFiles/bear-editor.dir/code/accelerator_table.cpp.o] Error 1
make[2]: Leaving directory '/home/martin/rpmbuild/BUILD/bear-40f21582e3b4a93db9a9e8464bc97c9a0c9872ae'
make[1]: *** [CMakeFiles/Makefile2:2022: bear-factory/bear-editor/src/bf/CMakeFiles/bear-editor.dir/all] Error 2

The Bear Factory (i.e. the editors for the Bear Engine) requires wiWidgets < 3. Changes in the API of wxWidgets broke some parts of the editors.

If you are not interested by the editors, please pass the -DBEAR_EDITORS_ENABLED=0 argument to CMake.

Thanks, disabling the bear editor was the solution.