g_thread_init() problems



Hi all,

I have the following piece of code in a program of mine....

if (!g_thread_supported())
  g_thread_init(NULL);

...running on Solaris 2.6 w GTK/GLIB v1.2.6.

When I try to compile it I get this error:

Sovereign[259] ~/rwaves>gcc -Wall whatever.c `gtk-config --cflags --libs`
`gdkmagick-config --libs`
/var/tmp/ccVtLX4k.o: In function `main':
/var/tmp/ccVtLX4k.o(.text+0x138e0): undefined reference to `g_thread_init'
collect2: ld returned 1 exit status
Sovereign[260] ~/rwaves>

And yet if I called g_thread_init() without any arguments it complains
because there isn't enough arguments to it!

Is this a problem with POSIX thread incompatibility on Solaris?

Rich

PS - If anyone knows anything about using threads with GTK - could they help
or point me in a direction where I can be helped! I can't find much
documentation about them anywhere!



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