Q:

wxWidgets doesn't show window under Macbook Air (OS system)

1) I've already installed gtk2 with port (port install gtk2)
2) I've compiled my code (using wx) successfully.
When I execute my binary, it doesn't work as I expected. No window shows there.
Below is my simple demo code:
#include <wx/wx.h>

enum
{
    ID_FRAME,
    ID_BTN,
};

class HelloWorldApp : public wxApp
{
public:
    virtual bool OnInit();
private:
    wxButton* button;
};

IMPLEMENT_APP(HelloWorldApp)

bool HelloWorldApp::OnInit()
{
    wxFrame *frame = new wxFrame((wxFrame*) NULL, ID_FRAME, _T("Hello wxWidgets World"));
    frame->CreateStatusBar();
    frame->SetStatusText(_T("Hello World"));
    button = new wxButton((wxFrame *)frame, ID_BTN, _T("123"));
    frame->Show(TRUE);
    SetTopWindow(frame);
    return true;
}

A:

First of all, you really shouldn't using wxGTK under OS X unless you really know what you're doing, the normal thing to do is to use wxOSX.
Second, under OS X applications must be compiled as bundles, look at any of the wxWidgets samples for example.

