gtk2 Segmentation faults



Hello.

Please cc me. I'm not subscribed (yet).

No matter what gtk2-code I compile, every time it crashes immediately after the first gtk-statement.

Even that simple tutorial from gtk.org crashes (here: "GtkWidget *window;") :

#include <gtk/gtk.h>

int main( int   argc,
          char *argv[] )
{
    GtkWidget *window;
    
    gtk_init (&argc, &argv);
    
    window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
    gtk_widget_show  (window);
    
    gtk_main ();
    
    return 0;
}

I compile it using:

gcc test.c -o test $(pkg-config --cflags --libs gtk+-2.0)

Output of pkg-config --cflags --libs:

 -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/X11R6/include -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangox-1.0 -lpangoxft-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0

I'm using gcc 2.96 (that from Redhat 7.2). (BTW: I used the src-rpms from Redhat's Rawhide. pkgconfig, glib2, pango, atk, gtk2)

So what is wrong here ? Or is it a stupid fault of mine ?

*Kristian

  :... [snd.science] ...:
 ::
 :: http://www.korseby.net
 :: http://gsmp.sf.net
  :..........................:



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