Mail Archives: djgpp-workers/2001/02/08/15:10:14
Eli Zaretskii wrote:
> > It just means that STLport users can't #include <cwctype>, because
> > it will always give errors.
>
> Is it possible to explain, without citing too large portions of the
> headers, why would a missing prototype fail compilation even if the
> application only includes the header? I'm afraid I don't understand
> that, especially since libstdc++ headers don't cause such failures.
The libstdc++ headers don't try to do anything as crazy as the
STLport headers. ;-)
STLport defines everything in its own namespace rather than in
namespace std. (I think this is to avoid possible conflicts with
the native library.) It then #defines std to the name of its own
namespace. In order for this to work with the C library it needs to
pull everything from the C library into its own namespace. So cwctype
has lots of lines like
using __STL_VENDOR_CSTD::iswalpha;
If any symbol that it tries to grab has not been declared then you
get a compile-time error.
Stephen
- Raw text -