Kod: Zaznacz cały
(process:10491368): GLib-GObject-CRITICAL **: /home/joss/deb/pkg-gnome/desktop/lenny/build-area/glib2.0-2.16.6/gobject/gtype.c:2248: initialization assertion failed, use IA__g_type_init() prior to this function
(process:10491368): GLib-GObject-CRITICAL **: g_object_new: assertion `G_TYPE_IS_OBJECT (object_type)' failed
(process:10491368): libglade-CRITICAL **: glade_xml_construct: assertion `self != NULL' failed
(process:10491368): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed
(process:10491368): libglade-CRITICAL **: glade_xml_signal_autoconnect: assertion `self != NULL' failed
(process:10491368): libglade-CRITICAL **: glade_xml_get_widget: assertion `self != NULL' failed
(process:10491368): GLib-GObject-CRITICAL **: /home/joss/deb/pkg-gnome/desktop/lenny/build-area/glib2.0-2.16.6/gobject/gtype.c:2248: initialization assertion failed, use IA__g_type_init() prior to this function
(process:10491368): GLib-CRITICAL **: g_once_init_leave: assertion `initialization_value != 0' failed
(process:10491368): GLib-GObject-CRITICAL **: /home/joss/deb/pkg-gnome/desktop/lenny/build-area/glib2.0-2.16.6/gobject/gtype.c:2248: initialization assertion failed, use IA__g_type_init() prior to this function
(process:10491368): GLib-GObject-CRITICAL **: /home/joss/deb/pkg-gnome/desktop/lenny/build-area/glib2.0-2.16.6/gobject/gtype.c:2248: initialization assertion failed, use IA__g_type_init() prior to this function
(process:10491368): GLib-GObject-CRITICAL **: /home/joss/deb/pkg-gnome/desktop/lenny/build-area/glib2.0-2.16.6/gobject/gtype.c:2248: initialization assertion failed, use IA__g_type_init() prior to this function
(process:10491368): GLib-GObject-CRITICAL **: g_type_add_interface_static: assertion `G_TYPE_IS_INSTANTIATABLE (instance_type)' failed
(process:10491368): GLib-GObject-CRITICAL **: /home/joss/deb/pkg-gnome/desktop/lenny/build-area/glib2.0-2.16.6/gobject/gtype.c:2248: initialization assertion failed, use IA__g_type_init() prior to this function
(process:10491368): GLib-GObject-CRITICAL **: g_type_add_interface_static: assertion `G_TYPE_IS_INSTANTIATABLE (instance_type)' failed
(process:10491368): Gtk-CRITICAL **: gtk_widget_show: assertion `GTK_IS_WIDGET (widget)' failed
Kod: Zaznacz cały
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <gtk/gtk.h>
#include <gdk/gdkx.h>
#include <glade/glade.h>
int main(int argc, char *argv[])
{
GladeXML *xml;
GtkWidget *window1;
xml = glade_xml_new("projekt2.glade", "MyWindow", 0);
glade_xml_signal_autoconnect (xml);
window1 = glade_xml_get_widget (xml, "window1");
gtk_widget_show (window1);
gtk_main ();
}
Kod: Zaznacz cały
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
<glade-interface>
<widget class="GtkWindow" id="window1">
<child>
<placeholder/>
</child>
</widget>
</glade-interface>
Kod: Zaznacz cały
gcc -o progr2.o progr2.c `pkg-config --cflags --libs libglade-2.0`