wxWidgets OnInit <p>This code works fine:</p> <pre><code>#include &lt;wx/wx.h&gt; class MyApp : public wxApp { virtual bool OnInit(); }; IMPLEMENT_APP(MyApp) bool MyApp::OnInit() { wxFrame *frame = new wxFrame(NULL, -1, _("Hello World"), wxPoint(50, 50), wxSize(450, 350)); frame-&gt;Show(true); return true; } </code></pre> <p>But this doesn't:</p> <pre><code>#include &lt;wx/wx.h&gt; class MyApp : public wxApp { virtual bool OnInit(); }; IMPLEMENT_APP(MyApp) bool MyApp::OnInit() { wxFrame frame(NULL, -1, _("Hello World"), wxPoint(50, 50), wxSize(450, 350)); frame.Show(true); return true; } </code></pre> <p>It doesn't give any compilation/link/execution error, just don't show up the window. Why this?</p>