c++ - error: ‘virtual bool wxTopLevelWindowGTK::Show(bool)’ is inaccessible -


i trying compile wxwidgets first example command-line, , getting following error

/usr/local/include/wx-3.0/wx/gtk/toplevel.h: in member function ‘virtual bool myapp::oninit()’: /usr/local/include/wx-3.0/wx/gtk/toplevel.h:63:18: error: ‘virtual bool wxtoplevelwindowgtk::show(bool)’ inaccessible      virtual bool show(bool show = true);                   ^ app1.cpp:36:19: error: within context    frame->show(true);                    ^ app1.cpp:36:19: error: ‘wxtoplevelwindowgtk’ not accessible base of ‘myframe’ 

i using command line compile program

g++ -v `wx-config --version=3.0 --cxxflags` -std=c++11 `wx-config --version=3.0 --libs` app1.cpp 

and getting following error log : error log

complete code: source code

class myframe : wxframe 

should be

class myframe : public wxframe 

by default class inheritence private. in error message ‘wxtoplevelwindowgtk’ not accessible base of ‘myframe’ pretty description of has gone wrong.


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -