Re: gnome and pthreads
- From: "Frank W. Miller" <fwmiller cornfed com>
- To: todd <taf2 lehigh edu>, gtk-app-devel-list gnome org
- Subject: Re: gnome and pthreads
- Date: Fri, 30 Apr 2004 22:12:02 -0400
I'm not sure what you mean by this, does that go in my LDFLAGS or
something? When I execute the command standalone, I get the following
output:
[fwmiller localhost gnome]$ pkg-config gthread-2.0 --cflags --libs
Package gthread-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gthread-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gthread-2.0' found
This doesnt look promising...
My current LDFLAGS are:
LDFLAGS = `gnome-config --libs gnome gnomeui`
I am running a stock Red Hat 9 distro.
FM
todd wrote:
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
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]