This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Problem with istream.seekg() and __mbstate_t


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          


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]