gtk-2.0 + gtkglarea -> segfault



Here is what I get when I compile my program that uses gtk-2.0 and the 
gtkglarea widget:


gcc -Wall -ggdb -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 
-o exe parseur.o processor.o object3D.o main.o   -L/usr/X11R6/lib -Wl,
--export-dynamic -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm 
-lpangoxft-1.0 -lpangox-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl 
-lglib-2.0 -lGL -lGLU -lgtkgl
/usr/local/lib/libgtkgl.so: undefined reference to `gtk_type_is_a'
/usr/local/lib/libgtkgl.so: undefined reference to `gtk_widget_pop_visual'
/usr/local/lib/libgtkgl.so: undefined reference to `gdk_pixmap_ref'
/usr/local/lib/libgtkgl.so: undefined reference to `gdk_pixmap_unref'
/usr/local/lib/libgtkgl.so: undefined reference to `gdk_window_get_type'
/usr/local/lib/libgtkgl.so: undefined reference to 
`gtk_type_check_object_cast'
/usr/local/lib/libgtkgl.so: undefined reference to 
`gtk_type_check_class_cast'
/usr/local/lib/libgtkgl.so: undefined reference to `gtk_widget_push_visual'
collect2: ld returned 1 exit status
make: *** [exe] Erreur 1


So to get over this I've installed the version 1.2.3 of gtkglarea (I had the 
1.2.2) and now it compiles OK But then I get a segmentation fault at 
execution. When I use gdb I have the following :

75        glarea = create_glarea ();
(gdb) n

Program received signal SIGSEGV, Segmentation fault.
0x40703487 in XVisualIDFromVisual () from /usr/X11R6/lib/libX11.so.6
(gdb) n

To be more precise it crashes here:

 int attrlist[] = {
    GDK_GL_RGBA,
    GDK_GL_DOUBLEBUFFER,
    GDK_GL_DEPTH_SIZE, 1,
    GDK_GL_NONE
  };


  if ((glarea = gtk_gl_area_new(attrlist)) == NULL) {   
CRASH
    g_print("Error creating GtkGLArea!\n");
    return NULL;
  }

Does someone have any idea why ???
Thanx
Sam

------------------------------------------

Faites un voeu et puis Voila ! www.voila.fr 





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