Re: pthreads + gtk



On Thursday 19 September 2002 06:09 am, Arnaud Charlet wrote:
> >       a) surround ****EVERY*** call to a GDK, GTK or X11 function
> >           with gdk_threads_{enter,leave} pair
>
> That's misleading, only calls from a thread other than the thread running
> the main loop should call gdk_threads_enter/leave.
>
> Arno
> _______________________________________________
> gtk-list mailing list
> gtk-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-list

Well, then I have another question regarding threads:

First the example "gtk-thread.c" doesn't compile with the command they 
advertise, but it works with the additional library added "gdk-x11-2.0"

$ gcc gtk-thread.c -lgdk-x11-2.0 `gtk-config --cflags --libs gthread`

But it fails with g++

$ g++ gtk-thread.cpp -lgdk-x11-2.0 `gtk-config --cflags --libs gthread`
thread.c: In function `int main (int, char **)':
thread.c:99: `gdk_threads_init' undeclared (first use this function)
thread.c:99: (Each undeclared identifier is reported only once for each
function it appears in.)

any hints?  I've done all my coding in C++

Thanks,
-Rich



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