Subj : Re: How to pass class-member function to pthread_create(....)? To : comp.programming.threads From : Vyacheslav Kononenko Date : Tue Jul 19 2005 07:16 am Jedrzej Dudkiewicz wrote: > [SKIPPED] > We use C headers and C libraries in C++ code. The only way to achieve it = in > C++ is to declare function passed to this libraries as extern "C". > > JD Thats simply not true. It is NOT the ONLY way, sorry. Just a sample from C++ standard (=A725.4): extern "C" void qsort(void* base, size_t nmemb, size_t size, int (*compar)(const void*, const void*)); extern "C++" void qsort(void* base, size_t nmemb, size_t size, int (*compar)(const void*, const void*)); Another solution could be to make pthread_create not extern "C" in header (just default) and provide two version of it in the library - one for C and one for C++. And thats need to be done only in compiler where C++ and C functions use different calling conventions. Regards, Vycheslav .