Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Dec 2002 09:21:36 -0600
From:      "Victor R. Cardona" <vcardon@siue.edu>
To:        freebsd-stable@FreeBSD.ORG
Subject:   Re: pthread woes
Message-ID:  <20021220152136.GD6707@client156-156.siue.edu>
In-Reply-To: <20021220013445.GA75547@hackerheaven.org>
References:  <20021220013445.GA75547@hackerheaven.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--6Nae48J/T25AfBN4
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, Dec 20, 2002 at 02:34:45AM +0100, Emiel Kollof wrote:
> When I compile it, I get the following errors:
>=20
> % gcc test.c -o test.c
> /tmp/ccF3QI1k.o: In function `PrintHello':
> /tmp/ccF3QI1k.o(.text+0x20): undefined reference to `pthread_exit'
> /tmp/ccF3QI1k.o: In function `main':
> /tmp/ccF3QI1k.o(.text+0x76): undefined reference to `pthread_create'
> /tmp/ccF3QI1k.o(.text+0xba): undefined reference to `pthread_exit'
>=20
> It compiles fine when I use -lc_r. This also breaks a lot of ports. What's
> going on?

Use the -pthread arguement for gcc.

Victor
--6Nae48J/T25AfBN4
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE+AzV/758g6wZaI14RAgYKAJ48FqVhr8Q/mwJuwNZvUrdyu9d0zgCfXsPc
aqdoylTOgSyvL12OEmBH/qU=
=1HT/
-----END PGP SIGNATURE-----

--6Nae48J/T25AfBN4--

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021220152136.GD6707>