Subj : Re: How to pass class-member function to pthread_create(....)? To : comp.programming.threads From : David Hopwood Date : Wed Jul 20 2005 02:05 pm David Schwartz wrote: > "David Hopwood" wrote: >>David Schwartz wrote: > >>> Huh? The purpose of extern "C" is specifically does ensure that your >>>C++ compiler generated code is compatible with C code. You can know that >>>you have this compatability by passing '-pthread' to your C++ compiler, >>>which is guaranteed to provide a compatible (with that compiler) pthreads >>>implementations. > >>Unfortunately not, even for a certain compiler where -pthread is sometimes >>the right option: > >> > > Nobody ever said there couldn't be bugs. That some particular platform > has some particular bug that causes it to violate some particular guarantee > in some particular standard doesn't change the fact that the standard > provides the guarantee. No relevant standard provides a guarantee that a conforming compiler will have a -pthread option that enables pthreads. The nearest thing to that would be -lpthread in the options to the POSIX c89 and c99 commands (for C, not C++). Note that the bugzilla entry is for a missing feature ("Severity: enhancement"), not a bug in the normal sense, despite the bugzilla terminology which calls all entries bugs. -- David Hopwood .