From owner-freebsd-questions@FreeBSD.ORG Sun Mar 6 21:41:10 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 84C1F16A4CE for ; Sun, 6 Mar 2005 21:41:10 +0000 (GMT) Received: from rosebud.otenet.gr (rosebud.otenet.gr [195.170.0.26]) by mx1.FreeBSD.org (Postfix) with ESMTP id C057643D55 for ; Sun, 6 Mar 2005 21:41:07 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from gothmog.gr (patr530-a020.otenet.gr [212.205.215.20]) j26LdfsZ018781; Sun, 6 Mar 2005 23:39:41 +0200 Received: from gothmog.gr (gothmog [127.0.0.1]) by gothmog.gr (8.13.3/8.13.3) with ESMTP id j26LduWf011739; Sun, 6 Mar 2005 23:39:56 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from giorgos@localhost) by gothmog.gr (8.13.3/8.13.3/Submit) id j26LdtaQ011738; Sun, 6 Mar 2005 23:39:55 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Date: Sun, 6 Mar 2005 23:39:55 +0200 From: Giorgos Keramidas To: Jonathon McKitrick Message-ID: <20050306213955.GA11496@gothmog.gr> References: <20050305183226.GA47472@dogma.freebsd-uk.eu.org> <20050306011827.GE2272@dan.emsphone.com> <20050306213249.GA4624@dogma.freebsd-uk.eu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050306213249.GA4624@dogma.freebsd-uk.eu.org> cc: Dan Nelson cc: freebsd-questions@freebsd.org Subject: Re: Which lib for pthreads? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Mar 2005 21:41:10 -0000 On 2005-03-06 21:32, Jonathon McKitrick wrote: >On Sat, Mar 05, 2005 at 07:18:31PM -0600, Dan Nelson wrote: >:In the last episode (Mar 05), Jonathon McKitrick said: >:> Linux lets me use -pthread, but under BSD I get 'undefined symbol >:> "pthread_mutex_lock."' >:> >:> What's the correct linker syntax for pthreads? >: >: That would be it. It should work on 4.* and 5.*. > > I found -lc_r does the trick. Not what I was expecting. -lpthread should work too.