When I tried to do some hread programming in my linux system, I have some problems:
Code:
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <pthread.h>
void main()
{
...
res = pthread_create(&a_thread, NULL, thread_function, (void *)message);
...
}
When I compiled this program, I got the error message:
undefined reference to `pthread_create'
And the POSIX version is 200112. Doesn't the system support thread program? or I need to modify the code?
Thanks!