Message-ID: <34FF4989.C5581B7D@magna.com.au> Date: Fri, 06 Mar 1998 11:55:37 +1100 From: Andrew Cottrell 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 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Precedence: bulk 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 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