From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f5392,ec7bf9fdab6aeb7 X-Google-Attributes: gidf5392,public X-Google-Thread: 111c93,ec7bf9fdab6aeb7 X-Google-Attributes: gid111c93,public X-Google-Thread: f9b51,ec7bf9fdab6aeb7 X-Google-Attributes: gidf9b51,public X-Google-ArrivalTime: 2001-05-07 19:10:14 PST Path: newsfeed.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!hammer.uoregon.edu!enews.sgi.com!cgl.ucsf.edu!dek From: dek@cgl.ucsf.edu (David Konerding) Newsgroups: comp.os.linux.development.system,comp.os.linux.alpha,comp.os.linux.setup Subject: Re: Linux, streams and the standard library Followup-To: comp.os.linux.development.system Date: 8 May 2001 02:04:07 GMT Organization: UCSF Computer Graphics Lab Message-ID: References: <9chri6$1q8$1@kantaka.co.uk> Reply-To: dek@cgl.ucsf.edu NNTP-Posting-Host: socrates.cgl.ucsf.edu User-Agent: slrn/0.9.7.0 (OSF1) Xref: newsfeed.google.com comp.os.linux.development.system:9126 comp.os.linux.alpha:2836 comp.os.linux.setup:30810 On 29 Apr 2001 20:54:46 +0100, Philip Armstrong wrote: > In article , > Neil Butterworth wrote: >>"John Beardmore" wrote in message >>news:WvwRxWTNLF76Ew5r@wookie.demon.co.uk... >> >>[snip] >>> >>> So - a couple of questions: >>> >>> 1) is there a way to get ostringstream to work ? >> >>Yes - use STLport. You can download it from www.stlport.org. > > Or install gcc-2.95.3 which has ostringstream in its version > of the STL. > >>> 2) is the Standard C++ library ready for prime time under Linux ? >>> Isn't its >>> use utterly routine these days ? Or am I trying to be too modern ? >> >>No, I've been using it for quite some time with absolutely no problems. Not >>under RedHat though - I run SuSE. > > Indeed. With gcc-2.95.3 the STL support is pretty complete. gcc-3.0 > should finish off all the corner cases in the c++ support hopefully. Not entirely true. STL support may be nearly complete (thanks to SGI) but the standard library isn't. STL is just a part of the standard library and ostringstream isn't part of STL (it's part of IOStreams). I've been playing with gcc-2.95.3 ad gcc-3.0pre (from CVS) to test their standard C++ library. It's far from as good as STLport. I get segfaults when using ostringstreams heavily-- I ran out of time figuring out the minimal test case which reproduces the problem, mailing them in, waiting for them to be patched, downloading new versions of the compiler, recompiling the compiler and the library (1-2 hrs on a fast machine!), repeat. THat's why I responded earlier saying "I'm going to save you a lot of time" because 2.95.3 + STLport-4.0 is really stable & solid. I did spend a couple weeks chasing a really tricky bug which we were certain was STLport-4.0 but actually turned out to be a problem with the run time linker (if you make a C app that dlopen()s two shared object files, each of which is linked dynamically gainst STLport shared library, you get crashes in IOStreams, because the run-time linker doesn't resolve symbols properly when it loads the second .so. The main C app (python) specifically does not like havig RTLD_GLOBAL set when it dlopen()s the .so's, so it's not surprising we have this behavior (what's surprising is that IRIX and Tru64 don't have this "problem". We had to work around it using LD_PRELOAD-- yecch). But C++ dlls that get loaded into C programs are fairly esoteric, hopefully not an issue for most programmers.