From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,e78de1fab6a088d0 X-Google-Attributes: gidfee84,public From: schweng@astro.unibas.ch (Hans Schwengeler) Subject: Re: Unresolved reference: sem_wait Date: 2000/04/13 Message-ID: <38f594c5.0@maser.urz.unibas.ch>#1/1 X-Deja-AN: 610592861 References: <8d3inv$it1$1@Masala.CC.UH.EDU> Content-Type: text/plain; charset=us-ascii X-Trace: 13 Apr 2000 11:35:01 +0100, saturn.astro.unibas.ch Mime-Version: 1.0 Newsgroups: comp.unix.osf.osf1 In article <8d3inv$it1$1@masala.cc.uh.edu>, "Ali Berrached" writes: > I am trying to use semaphores for thread synchronization (using sem_init, > sem_wait, sem_post, etc.) on Digital Unix 4. But the cc compiler keeps > generating the error message "unresolved reference: sem_wait, sem_post, > ...). I have included and compiled using the -pthread option > (cc prog.c -pthread). It seems like I need to link to some library but > there is no mention of it in the documentation. Anyone else ran into this > problem before? any help will be greatly appreciated. > > Many Thanks > Ali Berrached > Dear Ali, grep -l sem_wait /usr/lib/* shows: /usr/lib/librt.a Yours, Hans. =============================================================================== Hans Schwengeler Astronomical Institute INTERNET: schweng@astro.unibas.ch University of Basel Hans.Schwengeler@unibas.ch Venusstrasse 7 CH-4102 Binningen PHONE: +41 61 20 55 422 Switzerland FAX: +41 61 20 55 455 ===============================================================================