I use eclipse for Fedora 17 (with GCC), and I have an undefined link to pthread_create (), even if pthread.h is enabled, and if I have -lpthread on the gcc build command line ...
Here is my code, just in case
void* repair()
{
int var;
for ( var = 0; var < NB_ITER ; var += 2 )
{
printf( "PAIR : %d\n", var );
}
return NULL;
}
void exo03()
{
pthread_t id1;
pthread_create(&id1, NULL, &repair, NULL);
}
Thanks for the help:)
source
share