Usenet comp.os.linux.alpha (1997-2013)
 help / color / mirror / Atom feed
From: dek@cgl.ucsf.edu (David Konerding)
Subject: Re: Linux, streams and the standard library
Date: 29 Apr 2001 18:28:16 GMT	[thread overview]
Message-ID: <slrn9eona0.9s1o.dek@socrates.cgl.ucsf.edu> (raw)
In-Reply-To: WvwRxWTNLF76Ew5r@wookie.demon.co.uk

On Sun, 29 Apr 2001 18:43:41 +0100, John Beardmore <wookie@wookie.demon.co.uk> 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


      parent reply	other threads:[~2001-04-29 18:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-04-29 17:43 Linux, streams and the standard library John Beardmore
2001-04-29 17:02 ` Neil Butterworth
2001-04-29 19:54   ` Philip Armstrong
2001-04-29 20:47     ` Rasmus Bøg Hansen
2001-05-08  2:04     ` David Konerding
2001-04-29 20:22   ` John Beardmore
2001-04-29 19:47     ` Neil Butterworth
2001-04-30  0:44       ` John Beardmore
2001-04-29 18:28 ` David Konerding [this message]
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox