Re: gnome and pthreads
- From: todd <taf2 lehigh edu>
- To: "Frank W. Miller" <fwmiller cornfed com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: gnome and pthreads
- Date: Fri, 30 Apr 2004 20:45:56 -0400
Frank W. Miller wrote:
Hi,
I've got a code snippet in my main.c that looks like this:
g_thread_init(NULL);
gdk_threads_init();
gtk_init(&argc, &argv);
...
gdk_threads_enter();
gtk_main();
gdk_threads_leave();
This is supposed to set up the ability to use Gnome in a threaded
application. Trouble is I'm getting link errors when I try to build it:
gcc `gnome-config --libs gnome gnomeui` -L../src -o sip callbacks.o
gui.o log.o main.o ringback.o -lsip -lpthread
main.o(.text+0x10a): In function `main':
: undefined reference to `g_thread_init'
main.o(.text+0x112): In function `main':
: undefined reference to `gdk_threads_init'
collect2: ld returned 1 exit status
make: *** [all] Error 1
The interesting thing I'm not getting undefine'ds for
gdk_threads_enter() and gdk_threads_leave(). I would luv it if I could
get some advice on this from someone.
Thanks in advance,
FM
You need to link to gthread-2.0
i.e. `pkg-config gthread-2.0 --cflags --libs`
-todd
[Date Prev][
Date Next] [Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]