1. As you know, the goal in "extern "C" is so that functions declared in C++ (but wrapped in the "extern C") will have C linkage (i.e. will NOT have C++ name mangling).
2. You'll probably make the declaration in a header. And you'll probably want the header to be compiled under EITHER C++ OR C.
3. To compile "extern C" under straight C, however, you'll need to turn on your cloaking shields.
EXAMPLE:
less /usr/include/pcre.h =>
Code:
#ifdef __cplusplus
extern "C" {
#endif
...
#ifdef __cplusplus
} /* extern "C" */
#endif
The macro "__cplusplus" is guaranteed to be defined for any C++ compiler.
'Hope that helps .. PSM