Gunnar Roth wrote:
IMHO calling conventions ( like _stdcall and _cdecl ) are about parameter cleanup and ordering and exnrnal c linkage is about how the function name is written ( mangled or not). I can see that calling convention could make problems with pthread, but cannot see what extern "C" should have to to with that. please enligthen me.
To quote my first source in the initial post:
"While most C++ implementations do NOT use calling conventions compatible with C for normal member functions, many DO for static member functions. Some, on the other hand, don't, and there's no reason they should. (That is, ANSI C++ says they needn't.)"
Its just that a program compiled in C++ mode doesn't need to follow C calling conventions (especially cleanup is important here) according to the standard. Since extern "C" should declare default C calling conventions within C++ code, it has something to do with it, I guess ;)
Greetings, Sascha Volkenandt