From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f8c9b,7946aa2e5601a031 X-Google-Attributes: gidf8c9b,public X-Google-Thread: fee84,7946aa2e5601a031 X-Google-Attributes: gidfee84,public X-Google-Thread: fc89c,7946aa2e5601a031 X-Google-Attributes: gidfc89c,public X-Google-Thread: ffc1e,7946aa2e5601a031 X-Google-Attributes: gidffc1e,public From: hopfner@lpr.e-technik.tu-muenchen.de (Thomas Hopfner) Subject: Re: Q: OSF1 -lpthreads -> core - why ? Date: 1996/04/03 Message-ID: #1/1 X-Deja-AN: 145604283 distribution: world references: <4js6bu$gai@news1.relcom.eu.net> <4jsm22$18u6@news.missouri.edu> organization: Lehrstuhl fuer Prozessrechner, TU Muenchen (Bavaria) reply-to: hopfner@lpr.e-technik.tu-muenchen.de newsgroups: comp.programming.threads,comp.unix.osf.osf1,comp.unix.questions,comp.unix.programmer originator: hopfner@batian.lpr.e-technik.tu-muenchen.de Hi there, we use OSF/1 V2.0 and Digital UNIX V3.2C here and ``man cc'' states: -threads Tell the linker to use the threadsafe version of libc, and - if it exists - the threadsafe version of any library specified with the -l flag, when linking programs. This flag also tells the linker to include libpthreads and its support libraries when linking with a pro- gram. Note that when you use this flag, it should appear last on the command line. This works well for me. CU, Tom. c632692@cclabs.missouri.edu (Vepa V Sirish) writes: >Yury July (july@Gemini.relcom.EU.net) wrote: >: Here's my stupid program: >: >: main(){ >: printf("hello\n"); >: } >: >: Should work, isn't it ? >: However, when linked with -lpthreads it coredumps! [...] >cc hello.c -Dalpha -D_SHARED_LIBRARIES -D_REENTRANT -w -ldce -lpthreads >-lc_r - lmach -lm [...] -- -- http://www.lpr.e-technik.tu-muenchen.de/~hopfner/