extern "C"

Just ran into this. And, by the way, I'm developing on a Mac using
Codewarrior Pro 3. Libwww headers like WWWLib.h are bracketed by "extern C"
and "}" when compiled under a C++ compiler. Unfortunately, for me at least,
headers like HTAccess.h, HTChunk.h, and HTReq.h are not similarly
"protected". Thus when the program is linked, many libwww entry points
which were accessed via WWWLib.h are correctly resolved, but the libwww
symbols in modules that included HTReq.h, for example, directly are
unresolved since they have been subjected to C++ name mangling.

I assume there was a reason why headers like WWWLib.h contain "extern C",
but headers like HTReq.h do not. Could someone explain it? I get around the
problem by bracketing the instantiation of the offending header files with
"extern C" myself, but the style god living inside me is offended.

regards,
-jim

Received on Monday, 14 December 1998 18:46:43 UTC