why "no matching function for call 'pthread_create' ..."

why "no matching function for call 'pthread_create' ..."
0.0 0


i createa a app with cocos2d-1.0.1-x-0.13.0-beta,
my code like :
pthread_create(recvThread, NULL, dorecv, NULL);

but it has a error show “no matching function for call ‘pthread_create’ …”
i try this at xcode c app, normail ios app (not use cocos2dx)
this code is ok……

why error at cocos2d-x ???


include this on your code

#include “pthread/pthread.h”

And link your application with cocos2dx/platform/third_party/win32/pthread (if you are working on a windows platform)


I prefer for using thread’s the boost library.