Re: SIGSEGV at "gtk_init" in a Multithreaded Code



On 03/07/05 17:23:56, polat ee bilkent edu tr wrote:

Hi,
I'm trying to execute the code example (about GTK and threads) at
http://developer.gimp.org/api/2.0/gdk/gdk-Threads.html
But whenever I execute it , it gives segmentation fault inside
"gtk_init(&argc,&argv)"  function. I have to mention that when I
comment  "g_thread_init" line, it works properly. What will be the
problem? Is it my makefile:

all :
gcc -g -o gtkThread gtk-thread.c -lpthread `pkg-config gtk+-2.0
gthread --cflags --libs`

This will pick up Gtk+ 2.x and GThread 1.x. I would try:

gcc -g -o gtkThread gtk-thread.c -lpthread `pkg-config gtk+-2.0 gthread-2.0 --cflags --libs`

instead (you shouldn't need the -lpthread either, but I doubt it's causing any problems).

Cheers,

Ali.




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