From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f678f,89dd1af5ea713090 X-Google-Attributes: gidf678f,public X-Google-ArrivalTime: 1994-04-11 05:37:46 PST Path: gmd.de!xlink.net!howland.reston.ans.net!europa.eng.gtefsd.com!MathWorks.Com!news.kei.com!bloom-beacon.mit.edu!paperboy.osf.org!sp From: sp@canal.osf.org (Simon Patience) Newsgroups: comp.unix.osf.misc Subject: Re: pthreads compilation problem Date: 11 Apr 1994 12:37:46 GMT Organization: Open Software Foundation Distribution: world Message-ID: <2obgaq$biv@paperboy.osf.org> References: NNTP-Posting-Host: canal.osf.org In article , deano@rabbit.otago.ac.nz (Dean McRobie) writes: > I am trying to use DEC OSF/1 for am Operating Systems course I am > teaching, I was going to write a process simulator and had thought to > use the threads facility of OSF/1 to simulate the processes. However, > I can not get ANYTHING to compile!!! In fact: > > #include > #include > > int main(int argc, char **argv) > { > printf("boo!\n"); > } > > followed by "cc -o boo boo.c -lpthread -lmach" says: > Segmentation Fault! > > HELP!!! What have I done wrong?!?!?!? I can not get to the DEC > example programs as they are unable to be extracted from the > documentation unless I intend to type them in (a last resort). > > Any help would be appreciated! I don't know what your problem is but I have two comments which might help. The header pthread.h should be included before any other file as it can modify their behavior. Secondly you should link with the re-entrant C library (-lc_r). I am assuming that DEC OSF/1 pthreads are the same as OSF OSF/1 pthreads! Good Luck Simon. -- Simon Patience Phone: (617) 621-7376 Open Software Foundation FAX: (617) 621-8696 1 Cambridge Center Email: sp@osf.org Cambridge, MA 02142 uunet!osf!sp