From owner-freebsd-stable Fri Dec 20 21:59:11 2002 Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 875F337B401 for ; Fri, 20 Dec 2002 21:59:08 -0800 (PST) Received: from creme-brulee.marcuscom.com (rdu57-17-158.nc.rr.com [66.57.17.158]) by mx1.FreeBSD.org (Postfix) with ESMTP id A172643EDE for ; Fri, 20 Dec 2002 21:59:07 -0800 (PST) (envelope-from marcus@marcuscom.com) Received: from [192.168.1.4] (shumai.marcuscom.com [192.168.1.4]) by creme-brulee.marcuscom.com (8.12.6/8.12.6) with ESMTP id gBL5w23a072492; Sat, 21 Dec 2002 00:58:02 -0500 (EST) (envelope-from marcus@marcuscom.com) Subject: Re: More information (was Re: pthread woes) From: Joe Marcus Clarke To: Wes Peters Cc: Emiel Kollof , freebsd-stable@FreeBSD.ORG In-Reply-To: <20021220223826.6c728bc6.wes@softweyr.com> References: <20021220013445.GA75547@hackerheaven.org> <20021220020545.GC75547@hackerheaven.org> <20021220223826.6c728bc6.wes@softweyr.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-WypjGQJO5DT9uNMlm5iP" Organization: MarcusCom, Inc. Message-Id: <1040450347.29101.56.camel@shumai.marcuscom.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.1 Date: 21 Dec 2002 00:59:07 -0500 X-Spam-Status: No, hits=-3.3 required=5.0 tests=AWL,IN_REP_TO,NOSPAM_INC,PGP_SIGNATURE_2,QUOTED_EMAIL_TEXT, REFERENCES,SPAM_PHRASE_01_02 version=2.43 Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --=-WypjGQJO5DT9uNMlm5iP Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Fri, 2002-12-20 at 17:38, Wes Peters wrote: > On Fri, 20 Dec 2002 03:05:45 +0100 Emiel Kollof wrote: >=20 > > * Emiel Kollof (coolvibe@hackerheaven.org) wrote: > > > Hi folks, > > >=20 > > > I have a problem with compiling stuff that uses POSIX threads. I used > > > the following snippet of code to test: > >=20 > > I tried another snippet of code: > >=20 > > #include > > #include > > int main() {=20 > > return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_versi= on)); ;=20 > > return 0;=20 > > } > >=20 > > This fails like this: >=20 > Nope, you're still making the same mistake: >=20 > #include > #include > int main() {=20 > printf("%d.%d.%d\n", > (gtk_major_version), > (gtk_minor_version), > (gtk_micro_version)); > return 0; > } >=20 > $ gcc -pthread -o gtktest gtktest.c `gtk12-config --libs` `gtk12-config -= -cflags` > $ ./gtktest =20 > 1.2.10 >=20 > By the way: >=20 > $ gtk12-config --cflags > -I/usr/X11R6/include/gtk12 -I/usr/local/include/glib12 -I/usr/local/inclu= de -I/usr/X11R6/include >=20 > If GTK applications on FreeBSD require -pthread to link successfully, gtk= 12-config > should probably include this option when asked for --cflags. Actually, it would come through with --libs. However, this isn't necessary for all gtk12 applications. For instance, this test app compiles just fine without -pthread. Threaded gtk applications usually make use of the gthread module, which, if you run glib12-config gthread --libs, does give you -thread. I suspect something is badly screwed up with Emiel's X11 installation. Joe --=20 PGP Key : http://www.marcuscom.com/pgp.asc --=-WypjGQJO5DT9uNMlm5iP Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQA+BAMqb2iPiv4Uz4cRAg/MAJwMjqqfkYPrOxVXT3ae8JSwmKmE/QCfRY4w oP1GwlfMFPcNCRBwhFEfScI= =QdA8 -----END PGP SIGNATURE----- --=-WypjGQJO5DT9uNMlm5iP-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message