This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Problem with istream.seekg() and __mbstate_t
- To: libstdc++ at gcc dot gnu dot org
- Subject: Re: Problem with istream.seekg() and __mbstate_t
- From: Craig Rodrigues <rodrigc at mediaone dot net>
- Date: Fri, 16 Feb 2001 20:16:38 -0500
- References: <20010211225448.A26071@mediaone.net>
Hi,
According to this message on the glibc mailing list:
http://sources.redhat.com/ml/libc-alpha/2001-02/msg00150.html
the change between glibc 2.1 and glibc 2.2
in terms of mbstate_t vs. __mbstate_t is known. This directly
affects libstdc++-v3.
So, for the packagers of gcc and libstdc++, ie. Redhat, Mandrake,
etc., etc., can you please make sure that your rpm spec files
have a dependency on the glibc version that libstdc++ was compiled against?
CodeSourcery, can you do this with your daily gcc snapshots?
Thanks.
--
Craig Rodrigues
http://www.gis.net/~craigr
rodrigc@mediaone.net
On Sun, Feb 11, 2001 at 10:54:48PM -0500, Craig Rodrigues wrote:
> Hi,
>
> Compiler: gcc version 2.97 20010211 (experimental)
> Glibc version: GNU C Library stable release version 2.2.1
> Compiled by GNU CC version 2.96 20000731 (Red Hat Linux 7.0).
> Compiled on a Linux 2.4.0-0.43.6 system on 2001-01-15.
>
> OS: Redhat Linux 7.0
>
>
> Problem: The following code snippet fails to link:
>
> ===========================================================================
> #include <iostream>
> using namespace std;
>
> void seek(istream& i)
> {
> unsigned long pos = 35;
> i.seekg(pos);
> }
>
> int main(int, char **) { return 0; }
> ===========================================================================
>
> % g++ d.cc
> /tmp/ccx9JhBd.o: In function `seek(std::istream&)':
> /tmp/ccx9JhBd.o(.text+0x3c): undefined reference to `std::istream::seekg(std::fpos<__mbstate_t>)'
> collect2: ld returned 1 exit status
>
> Doing an nm on libstdc++.so.3, the closest symbol I could find was:
> 00053288 W std::istream::seekg(std::fpos<mbstate_t>)
>
> __mbstate_t is not defined anywhere in the libstdc++ sources, but
> it seems to be defined in the glibc sources.
>
> How can I solve this problem?
>
> Thanks.
> --
> Craig Rodrigues
> http://www.gis.net/~craigr
> rodrigc@mediaone.net