From: sp@canal.osf.org (Simon Patience)
Subject: Re: pthreads compilation problem
Date: 11 Apr 1994 12:37:46 GMT [thread overview]
Message-ID: <2obgaq$biv@paperboy.osf.org> (raw)
In-Reply-To: DEANO.94Apr9101756@rabbit.otago.ac.nz
In article <DEANO.94Apr9101756@rabbit.otago.ac.nz>, 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 <stdio.h>
> #include <pthread.h>
>
> 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
next prev parent reply other threads:[~1994-04-11 12:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1994-04-08 22:17 pthreads compilation problem Dean McRobie
1994-04-11 12:37 ` Simon Patience [this message]
1994-04-11 15:24 ` Burkhard Neidecker-Lutz
1994-04-11 16:47 ` Steve Strange USG
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox