I was trolling trough the gdk reference and found out (in small print and
easily missed):

Note: To use g_thread_init() in your program, you have to link with the
libraries, that the command "glib-config --libs gthread" outputs. This is
not the case for all the other thread related
              functions of GLib. Those can be used without having to link
with the thread libraries.

Shouldn't this be added to the faq q on threads?

Sean Cody (aka NullStream) 
[EMAIL PROTECTED] (SCHOOL)
[EMAIL PROTECTED]     (HOME)

"If God's my witness then God must be blind."
        Garbage - As Heaven Is Wide

---------- Forwarded message ----------
Date: Mon, 21 Feb 2000 12:46:20 -0600 (CST)
From: Sean Cody <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: g_thread_init undefined?

Experimenting with threads.  Yes I read the faq and the example source
doesn't compile at all on both solaris(1.2.3) and linux(1.2.6) I get

/tmp/cc595wkr.o: In function `main':
/tmp/cc595wkr.o(.text+0xc): undefined reference to `g_thread_init'
collect2: ld returned 1 exit status

Compile Command: gcc -o t2 t2.c `gtk-config --cflags` `gtk-config --libs`

t2.c:
#include <glib.h>

int main(int argc,char **argv)
{
 g_thread_init(NULL);
}

Is there something I am missing I can't seem to figure this out.  On both
systems g_thread_init is defined in glib.h but not in libraries?

Ugeth,

Sean Cody (aka NullStream) 
[EMAIL PROTECTED] (SCHOOL)
[EMAIL PROTECTED]     (HOME)

"If God's my witness then God must be blind."
        Garbage - As Heaven Is Wide


-- 
To unsubscribe: mail -s unsubscribe [EMAIL PROTECTED] < /dev/null

Reply via email to