Utiliser pthread en c ++

Je suis en utilisant pthread.h dans un *.cc fichier. lorsque j'essaie d'utiliser pthread_exit(0); ou pthread_join(mythrds[yy],NULL); il dit:

.cc:(.text+0x3e): undefined reference to `pthread_exit'

s'il est respecté, très semblable code dans un *.c fichier avec gcc, il travail parfait. Comment puis-je utiliser pthread est en c++.. (j'ai aussi ajouté -lpthread)

..
void *myThreads ( void *ptr )
{
...
pthread_exit(0); 
}
..

drapeaux:

g++ -lpthread -Wall -static -W -O9 -funroll-all-loops -finline -ffast-math

source d'informationauteur ogzylz | 2010-04-21