[Glade-users] Segmentation fault



hi all,
i have a redhat 9.0 package and installed its libglade(libglade-2.0).
i just created a GTK project using GLADE and add only one window, here is my 
xml file:

<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd";>

<glade-interface>

<widget class="GtkWindow" id="window1">
  <property name="visible">True</property>
  <property name="title" translatable="yes">window1</property>
  <property name="type">GTK_WINDOW_TOPLEVEL</property>
  <property name="window_position">GTK_WIN_POS_NONE</property>
  <property name="modal">False</property>
  <property name="resizable">True</property>
  <property name="destroy_with_parent">False</property>

  <child>
    <placeholder/>
  </child>
</widget>

</glade-interface>

then i wrote a c file, here it is:

#include <gtk/gtk.h>
#include <glade/glade.h>

main(int *argc,char *argv[])
{
        GladeXML *xml;

        gtk_init(&argc,&argv);
        glade_init();

        xml=glade_xml_new("second.glade",NULL);

        gtk_main();
        return 0;
}

i can compile this file using "cc -o second second.c `libglade-config --cflags 
--libs`" but when i type ./second , it prompts Segmentation fault, why?

thank you in advance,
bye





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