delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/03/05/20:01:44

Message-ID: <34FF4989.C5581B7D@magna.com.au>
Date: Fri, 06 Mar 1998 11:55:37 +1100
From: Andrew Cottrell <acottrel AT magna DOT com DOT au>
Reply-To: acottrel AT magna DOT com DOT au
MIME-Version: 1.0
To: pthreads-bugs AT ada DOT cs DOT fsu DOT edu, djgpp AT delorie DOT com
Subject: Pthreads & LIBC link error

Hi,

I am starting to experiment with multithreading packages to see how
they work and would like to use a standard package (that is POSIX
compatible) and as such I have downloaded the PTHREADS library from
FSUni and built it without a problem. When I tried to build the example
program in the readme file
it gives the following error:

c:/djgpp/lib/libc.a(sigprocm.o)(.text+0x1b8):sigprocm.c: multiple
definition of
`sigpending'
../lib/libgthreads.a(signal.o)(.text+0x1940):signal.c: first defined
here

Does anyone know how to correctly resolve this error?


Regards,
Andrew


=======================    TEST1.C  =======================

#include <pthread.h>

void new_thread(arg)
  int *arg;
{
  printf("new thread argument = %d\n", *arg);
}

main()
{
  pthread_t th;
  int i = 1;

  pthread_init();

  pthread_create(&th, NULL, new_thread, &i);
  pthread_join(th, NULL);
  pthread_detach(&th);
}

=======================   MAKEFILE  =======================
LIB=../lib/libgthreads.a
GCC=gcc
FLAGS=-m486 -O3 -s -I. -I../include

all:     test1.exe

%.exe:    %.c $(LIB)
 $(GCC) $(FLAGS) $*.c $(LIB) -o $*.exe





- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019