From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,f9bc273cd76dcd51 X-Google-Attributes: gidfee84,public X-Google-Thread: f678f,f9bc273cd76dcd51 X-Google-Attributes: gidf678f,public From: peltz@jaka.ece.uiuc.edu (Steve Peltz) Subject: Re: Problems with thread library in OSF1 V3.2 Date: 1996/07/22 Message-ID: <4t0eaf$agt@vixen.cso.uiuc.edu>#1/1 X-Deja-AN: 169514741 references: <4ss7rt$sm1@vixen.cso.uiuc.edu> organization: University Communications, Inc. newsgroups: comp.unix.osf.osf1,comp.unix.osf.misc In article , Rajeev Kumar Ranjan wrote: > From: peltz@jaka.ece.uiuc.edu (Steve Peltz) > Keywords: Cc: > >The compile command I used is: cc -g test.c -lpthreads > > Instead of -lpthreads, just use -threads (or -pthread if you upgrade to > DU 4.0). > >The OS version that I have (OSF1 V3.2 41.64 alpha) does not have >libthread.a. But is it certain that the presence of libthread.a will >solve the problem? Use -threads, NOT -lthreads or -lthread or -lpthreads or anything else. -threads is a flag to cc that tells it to use the thread-safe versions of libraries. When you explicitly specified libpthreads.a, you got some thread-safe versions and some non-thread versions, and the two sets of incompatible routines obviously don't work very well together. -pthread is similar (but only available on DU 4.0), but specifies to use the final version of the POSIX threads interface. -threads uses a draft version (-threads is still available in 4.0).