Re: SIGSEGV at "gtk_init" in a Multithreaded Code

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

 



On 03/07/05 17:23:56, polat@xxxxxxxxxxxxxxxxx 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.

_______________________________________________

gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list


[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux