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-ArrivalTime: 2001-04-29 12:10:04 PST Path: newsfeed.google.com!newsfeed.stanford.edu!paloalto-snf1.gtei.net!news.gtei.net!enews.sgi.com!cgl.ucsf.edu!dek From: dek@cgl.ucsf.edu (David Konerding) Newsgroups: comp.os.linux.development.system,comp.os.linux.alpha Subject: Re: Linux, streams and the standard library Followup-To: comp.os.linux.development.system Date: 29 Apr 2001 18:28:16 GMT Organization: UCSF Computer Graphics Lab Message-ID: References: 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:8755 comp.os.linux.alpha:2772 On Sun, 29 Apr 2001 18:43:41 +0100, John Beardmore wrote: > I'm starting a C++ project which has to compile to form both an MSVC 6 > command line application and an RH Linux 6.2 command line application. > > I was hoping to use C++ with the Standard Library as described in "The > C++ Programming Language" by Bjarne Stroustrup. WiIl this be > possible ? > > So - a couple of questions: > > 1) is there a way to get ostringstream to work ? > > 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 ? > I'm going to save you some time (because I wasted a lot of my own before learning what the answer was). ostringstream is not supported with RH6.2's supplied compiler/libraries. Yes, standard C++ library is ready for prime time under linux, but it's not an out-of-the-box experience yet. Yes, stndard C++ is utterly routine (on some platforms- for example, Tru64 and IRIX, as long as you have $$$). It's a bit "modern" since the specification was only standardized recently, and software people have to play catch-up. If you want standard C++ with the standard C++ library on Linux, and you are using RH 6.2, then download gcc-2.95.3, compile and install it according to the instructions, then download STLport-4.0 from www.stlport.org, and install it according to its instructions. Compile your apps to use the header files from STLport and link against the STLport library. The RH6.2 g++ compiler isn't standard C++ compiliant; gcc-2.95.3 is nearly enough so (more so than MSVC6 by far) for nearly all code. Worse, the standard C++ libray they included ISN'T standard. It's pre-standard, with crap like strstream.h. On the other hand, STLport is an excellent implementation of the standard C++ library. RH7.1 comes with a modified g++ compiler, its main issue is that the ABI it uses is incompatible with the standard g++ library and so when you try to link apps you have a hard time getting everything to work properly if you use things like exceptions. As long as you stick to their compiler, everything will work OK (although you'll pull your hair out trying to get STLport to compile with their compiler due to locations of some include files, I have solved this problem, drop me a line if youwant to know the details). You might run into some problems because the alpha version of linux tends to be less well-tested than the intel version, and might not compile as easily. Dave