Usenet comp.os.linux.alpha (1997-2013)
 help / color / mirror / Atom feed
* Linux, streams and the standard library
@ 2001-04-29 17:43 John Beardmore
  2001-04-29 17:02 ` Neil Butterworth
  2001-04-29 18:28 ` David Konerding
  0 siblings, 2 replies; 9+ messages in thread
From: John Beardmore @ 2001-04-29 17:43 UTC (permalink / raw)


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 ?

I ask, because as soon as I stated adding code to the class skeleton I 
found I needed to add a reference to the standard library at link time.

Was I being hopelessly naive in expecting it to be linked by default ? 
In the end I found it in:

     /usr/lib/gcc-lib/alpha-redhat-linux/egcs-2.91.66/libstdc++.a

but it doesn't seem to be in the default library path so I have to 
identify the full path in the Makefile.  That stuff now compiles, but is 
this normal ?


Now I've added stuff that requires the #include <sstream> according to 
Stroustrup.  I can find sstream.h, but only in:

     /usr/include/linuxconf/sstream.h

which doesn't seem to be in the default include path.  When I include 
this by giving the full path, the compile fails, complaining that 
ostringstream is undeclared, and it does indeed seem to be unmentioned 
the linuxconf sstream.h file.


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 having no problem getting this stuff to compile under MSVC 6.  Have 
I missed something obvious under Linux ?


If the compiler that ships with RH6.2 won't do what I need,  ( I guess 
it must be a year old now ! ),  is it simple to upgrade it to a later 
gcc that
will ?

If gcc won't work with the standard C++ lib, will the Compaq C for Linux 
Alpha compiler be any use ?  Will that compiler coexist with the Linux 
compiler ?  I gather I'd still need that for building kernels !

I've just tried to get an 'on line test drive' to see if the Compaq 
compiler would compile my code skeleton, but the link from the Compaq 
site is broken.

If I can, I'd rather stay with a standard Linux compiler so that we can 
port to Intel Linux if needs be later on.


Cheers, J/.
-- 
John Beardmore


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2001-05-08  2:04 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox