allidsarechosen
Programmer
Hi,
I have faced a problem when tried to run a small thread program in Sco OpenServer 5.0.6
I have installed FSUpthreads 3.5 and Pth1.4.0
The sample program is:
/* sampth.c */
#include <pthread.h>
#include <math.h>
void thread()
{
printf("I am subthread\n"
}
main()
{
pthread_t sub;
pthread_create(&sub,NULL,thread,NULL);
printf("I am main thread\n"
}
--------------------------
cc sampth.c -lgthreads
"sampth.c", line 13: warning: argument is incompatible with prototype: arg #3
undefined first referenced
symbol in file
pthread_create sampth.o
i386ld fatal: Symbol referencing errors. No output written to a.out
and tried with :
cc sampth.c -lpth -L/usr/local/lib/pth
"sampth.c", line 13: warning: argument is incompatible with prototype: arg #3
undefined first referenced
symbol in file
pthread_create sampth.o
i386ld fatal: Symbol referencing errors. No output written to a.out
Even though the libraries (gthreads and pth, pthread) are present, the program is not linked.
Can anyone help ?
Thanks.
Regards,
Cool
I have faced a problem when tried to run a small thread program in Sco OpenServer 5.0.6
I have installed FSUpthreads 3.5 and Pth1.4.0
The sample program is:
/* sampth.c */
#include <pthread.h>
#include <math.h>
void thread()
{
printf("I am subthread\n"
}
main()
{
pthread_t sub;
pthread_create(&sub,NULL,thread,NULL);
printf("I am main thread\n"
}
--------------------------
cc sampth.c -lgthreads
"sampth.c", line 13: warning: argument is incompatible with prototype: arg #3
undefined first referenced
symbol in file
pthread_create sampth.o
i386ld fatal: Symbol referencing errors. No output written to a.out
and tried with :
cc sampth.c -lpth -L/usr/local/lib/pth
"sampth.c", line 13: warning: argument is incompatible with prototype: arg #3
undefined first referenced
symbol in file
pthread_create sampth.o
i386ld fatal: Symbol referencing errors. No output written to a.out
Even though the libraries (gthreads and pth, pthread) are present, the program is not linked.
Can anyone help ?
Thanks.
Regards,
Cool