Re: Wrapping gtkimageview



Am Thu, 06 Mar 2008 12:53:46 +0100 schrieb Murray Cumming:

> On Thu, 2008-03-06 at 00:09 +0100, Andreas Volz wrote:
> > Am Mon, 3 Mar 2008 19:43:49 +0100 schrieb Andreas Volz:
> > 
> > > ...
> > 
> > and I've also another problem while using the new gtkimageviewmm. I
> > build a simple Makefile project that uses the pkg-config script. It
> > compiles well and runs without problems.
> > 
> > But if I link gtkimageviewmm into my main application I get a
> > strange segfault and Gtk warnings at runtime. And I don't yet
> > include or use the new stuff.
> > 
> > Here is the output:
> > 
> > 
> > (lt-pogo:20959): glibmm-WARNING **: failed to wrap type of 'GtkHBox'
> 
> You are probably not initializing gtkmm. Do you have a Gtk::Main?
> Maybe you could post some very simple example code.

This is my app init function:

int create_gtk_window (int argc, char **argv)
{
  Gtk::Main kit(argc, argv);
  
  Application *app = NULL;
  
  // Load the Glade file and reference its widgets:
  Glib::RefPtr<Gnome::Glade::Xml> xml_glade;
  try
  { 
#ifdef GLADE_HEADER_COMPILE
    xml_glade = Gnome::Glade::Xml::create_from_buffer(
                pogo_glade_data, pogo_glade_data_size,
                "Application");
#else
    xml_glade = Gnome::Glade::Xml::create(
                searchGladeFile (POGO_GLADE_FILE) , "Application");
#endif
  }
  catch (const Gnome::Glade::XmlError& ex)
  { 
    std::cerr << ex.what() << std::endl;
    return 1;
  }
  
  // get the application window 
  xml_glade->get_widget_derived ("Application", app);
  if (app)
  { 
    kit.run ();
  }
  
  return 0;
}

Maybe I've done an error in the gtkimageviewmm wrap_init()?

regards
Andreas


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]