You need to create a free extern "C" function as a trampoline:
class foo { public: void *thread_func(); }; extern "C" void *thread_func(void *arg) { return static_cast<foo *>(arg)->thread_func(); } foo f; pthread_create(..., thread_func, &f);
R Samuel Klatchko Mar 17 '10 at 6:25 2010-03-17 06:25
source share