Menu

Application using wxWidgets

Nick Chang
2009-01-31
2012-09-26
  • Nick Chang

    Nick Chang - 2009-01-31

    Hey all,

    I have been using Dev-cpp for some months now, and liked it. However, recently, I came to know of the wxWidgets framework, and today, tried out compiling the code in Dev-cpp.

    Now the thing is, I want it to just compile a single cpp file to form an application, and I DON'T want a visual interface. I DON'T want multiple settings that have to be read up on to use. All I want it to do is to compile a cpp file that I have written completely.

    Now I have the (?) latest version [7.0 rc3], and I tried to compile a simple skeleton application:
    [code]#include <wx/wx.h>

    class BasicApp : wxApp
    {
    public:
    BasicApp();
    virtual bool OnInit();
    private:
    wxFrame* frame;
    };

    DECLARE_APP(BasicApp)
    IMPLEMENT_APP(BasicApp)

    BasicApp::BasicApp()
    {
    frame = new wxFrame(NULL, -1, "Hey There!");
    }

    bool BasicApp::OnInit()
    {
    frame->Show(true);
    return true;
    }[/code]

    I got the following errors:
    [code]
    hello.cpp: In function wxAppConsole* wxCreateApp()': hello.cpp:13: error:wxAppConsole' is an inaccessible base of `BasicApp'

    hello.cpp: In function `BasicApp& wxGetApp()':

    hello.cpp:13: error: wxAppConsole' is an inaccessible base ofBasicApp'

    mingw32-make.exe: *** [Objects/MingW/hello.o] Error 1[/code]

    Can anyone offer some advice?

    PS. I used 'Emty wxWidgets Project' for the project.

     
  • laxman varada

    laxman varada - 2010-08-16

    hi,
    it is good and used to programmers

    regards,
    phe9oxis,
    http://www.guidebuddha.com

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.