[問題] 在 Ubuntu 6.10 中寫 wxWidget 2.6 程式當機問題
請問一下各位先進,小弟在 Ubuntu 6.10 版下學習寫 wxWidget 2.6 的程式
可是不知為何,在「離開程式」的時候都會出現 程式記憶體區段錯誤 (core dumped)
我 compile 的方法如下: g++ test.cpp `wx-config --libs` `wx-config --cxxflags` -o testd
程式碼如下:
#include <wx/wx.h>
class HelloWorldApp : public wxApp
{
public:
virtual bool OnInit();
};
DECLARE_APP(HelloWorldApp)
IMPLEMENT_APP(HelloWorldApp)
bool HelloWorldApp::OnInit()
{
wxFrame *frame =
new wxFrame((wxFrame*) NULL, -1, _T("Hello wxWidgets World"));
frame->CreateStatusBar();
frame->SetStatusText(_T("Hello World"));
frame->Show(TRUE);
SetTopWindow(frame);
return true;
}
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 218.161.101.128
推
12/10 04:27, , 1F
12/10 04:27, 1F
推
12/10 07:47, , 2F
12/10 07:47, 2F
推
12/10 10:52, , 3F
12/10 10:52, 3F
推
12/10 11:46, , 4F
12/10 11:46, 4F
→
12/10 11:47, , 5F
12/10 11:47, 5F
→
12/10 11:48, , 6F
12/10 11:48, 6F
LinuxDev 近期熱門文章
PTT數位生活區 即時熱門文章