W3C home > Mailing lists > Public > www-lib@w3.org > October to December 1998

extern "C"

From: <Jim_Ravan@avid.com>
Date: Mon, 14 Dec 1998 18:44:40 -0500
To: www-lib@w3.org
Message-ID: <852566DA.00826F53.00@amm02.avid.com>

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.

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

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:33:48 UTC