Subject: iostream and stdc++ libraries with Mingw32
From: [email-masked] (Colin Peters)

1 Mar 1997 23:36:47 -0800
Approved: [email-masked]
Distribution: cygnus
Message-ID: <01BC2724.31DE7620.cygnus.gnu-win32@gbird0>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Original-To: "'GNU-Win32'" <[email-masked]>
Original-Sender: [email-masked]

Hello all,

I have managed to build a version of the iostream library with Mingw32 (one
of the tests that I did on the library didn't seem to work, the reread test
to be specific, but it seems to be mostly working otherwise). Now I was trying
to build a version of libstdc++. Almost everything compiles, but I get an odd
error compiling cstrio.o:

/src/libstdc++/std/bastring.cc: In function `class istream & getline(class istre
am &, class basic_string<char,string_char_traits<char> > &, char)':
/src/libstdc++/std/bastring.cc:475: `class basic_string<char,string_char_traits<
char> >' has no member named `npos'

I seem to remember this from the last time I tried to do this (back in
beta 16), but still, I wonder if anyone has any insights.

What's really odd about this is that this static const member is accessed
in many other places in the same file by member functions of basic_string.
The reference in question however, is a reference through the second
argument to the function (see the prototype given in the error message).
Does anyone have any idea what's going on here?

Colin.

PS. Another funny thing, when I moved the declaration of npos to the
    beginning of the class declaration all the other references to
    npos went haywire (not declared in this scope). Could this whole
    thing be related to the structure declaration inside this
    class declaration (I remember some people discussing problems
    with that)? If that was so though, I don't see how the guys at
    Cygnus could have built libstdc++ with the native toolchain.

-- Colin Peters - [email-masked]
-- Saga University Dept. of Information Science
-- http://www.fu.is.saga-u.ac.jp/~colin/index.html
-- http://www.geocities.com/Tokyo/Towers/6162/

-
For help on using this list, send a message to
"[email-masked]" with one line of text: "help".