/* * give it love: * g++ wxbug.cpp `wx-config --libs` `wx-config --cxxflags` -o wxbug */ #include "wx/wx.h" class MyApp: public wxApp { virtual bool OnInit(); }; IMPLEMENT_APP(MyApp) bool MyApp::OnInit() { /* Segfault! */ wxString filename = wxDirSelector( wxT("Choose a file to open")); /* This will work */ /* wxString filename = wxFileSelector( wxT("Choose a file to open"));*/ return TRUE; }