delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/02/08/15:10:14

Message-ID: <002201c0920b$1e47ee60$1a55893e@oemcomputer>
From: "Stephen Silver" <djgpp AT argentum DOT freeserve DOT co DOT uk>
To: "DJGPP Workers" <djgpp-workers AT delorie DOT com>
Subject: Re: wctype.h and STLport
Date: Thu, 8 Feb 2001 20:09:58 -0000
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 4.72.3110.1
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Reply-To: djgpp-workers AT delorie DOT com

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019