Mail Archives: djgpp/1998/03/05/20:01:44
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 -