From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,bba06bfe9d1a3982 X-Google-Attributes: gid1164f8,public X-Google-Thread: fee84,bba06bfe9d1a3982 X-Google-Attributes: gidfee84,public From: Dave Butenhof Subject: Re: pthreads libraries Date: 1996/12/05 Message-ID: <32A6D92D.6EEA@zko.dec.com>#1/1 X-Deja-AN: 202504773 references: content-type: text/plain; charset=us-ascii organization: Digital Equipment Corporation mime-version: 1.0 newsgroups: comp.unix.osf.osf1,comp.sys.dec x-mailer: Mozilla 3.01Gold (X11; I; OSF1 X4.0 alpha) William R. Pearson wrote: > > I have just upgraded to Digital Unix 4.0a, and wish to use the pthreads > libraries rather than cc -threads. > > However, I do not see them anywhere, and cc -pthreads says they cannot > be found. I assume I did not install them properly. > > What software kit must I install to get pthreads? Wrong switch. You want "cc -pthread", not "cc -pthreads". The old switch, for Draft 4 (DCE) threads and CMA threads was plural, but the new switch, for POSIX threads, is singular. The library is /usr/shlib/libpthread.so. If you need to do a manual link with ld for whatever reason use "-lpthread -lmach -lexc", right before the "-lc" at the end of the line. You should always compile with -pthread -- but if you don't, use -D_REENTRANT. There's no optional kit for threads -- it's part of the base system. However -- there's no static library (libpthread.a) for threads. You cannot link a threaded program -non_shared. We'll be restoring libpthread.a in the future, once kernel interface have stabilized. /---[ Dave Butenhof ]-----------------------[ butenhof@zko.dec.com ]---\ | Digital Equipment Corporation 110 Spit Brook Rd ZKO2-3/Q18 | | 603.881.2218, FAX 603.881.0120 Nashua NH 03062-2698 | \-----------------[ Better Living Through Concurrency ]----------------/