Re: [gtk-list] g_thread_init() problems
- From: Erik Mouw <J A K Mouw its tudelft nl>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] g_thread_init() problems
- Date: Sat, 15 Jan 2000 17:13:18 +0100 (MET)
On Fri, 14 Jan 2000 10:53:30 -0700, rhfreeman wrote:
> 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!
You forgot to tell the compiler that you wanted thread support. Try:
gcc -Wall whatever.c `gtk-config --cflags --libs gthread` `gdkmagick-config --libs`
^^^^^^^
Erik
--
J.A.K. (Erik) Mouw, Information and Communication Theory Group, Department
of Electrical Engineering, Faculty of Information Technology and Systems,
Delft University of Technology, PO BOX 5031, 2600 GA Delft, The Netherlands
Phone: +31-15-2785859 Fax: +31-15-2781843 Email J.A.K.Mouw@its.tudelft.nl
WWW: http://www-ict.its.tudelft.nl/~erik/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]