Topic: Standard C++ library
Author: pedwards@cs.wright.edu (Phil Edwards)
Date: 1998/02/25 Raw View
[cc'd to poster 'cause my articles rarely show up in csc++ :-)]
[Moderator's note: if your articles are not showing up,
and you have a valid "From" or "Reply-To" address,
and you are not receiving rejection notices,
then please let us know: <mailto:std-c++-request@ncar.ucar.edu>.
-Moderator (fjh).]
Russ LeMaster <rlemaste@bellsouth.net> wrote:
+ Hi all,
+
+ I am currently developing an API that must be portable across most Unix
+ platforms and Win32 platforms. My problem is in deciding whether or not
+ to try and use the standard C++ libraries or not. I know this sounds
+ like a no-brainer at first, you would say "SURE". However, I have found
+ that there seems to be no clear standard across all of these platforms
+ as to what the C++ library standard is.
Well, it's just recently been formally accepted, even though the guts
of the library have been "out there" for years. Still, without an
ANSI/ISO stamp on it, vendors didn't feel any pressure from the
customers (us) to provide the same functions.
Assuming that we complain to the vendors, it's still not going to
happen for a couple of years.
+ For example, if you look at
+ Rogue Wave's "String" class (which comes with Borland C++) and compare
+ that to Microsofts implementation (can't remember where they got
+ theres).
Never compare anything to Microsoft and expect it to be the same. I
wouldn't even trust their ANSI library to really /be/ the ANSI library,
even when they eventually produce one.
+ Therefore, my question is, how are people handling this? Should I simply
+ throw out their standard and go with one of the freely available C++
+ standard library implementations out there or just plug about 50,000
+ #ifdefs in my code?
I'd go with a freely-available library that conforms to CD2, since we
still can't see the FDIS without paying for it. It's been my
(admittedly limited) experience that the freeware writers are very
interested in getting the most up-to-date libraries written and
debugged; usually faster than the commercial vendors. This would allow
you to write Standard code and have it work in a predictable cross-
platform manner.
There would probably be difficulties at runtime if the Standard library
is dynamically linked, but you can get around that easily enough.
There seem to be a couple of other problems as the code ages, but I
can't think of a way to put it into words.
On that weak note,
Luck++;
/dev/phil
=> If you post a followup, please don't email a copy to me. I read news
often enough that replying to things twice is annoying. But thanks.
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html ]
Author: alpern@brightware.com (Adam Alpern)
Date: 1998/02/26 Raw View
(My apologies for sending this a second time - the first time went out with a
bogus sender address)
>Russ LeMaster <rlemaste@bellsouth.net> wrote:
>+ Hi all,
>+
>+ I am currently developing an API that must be portable across most Unix
>+ platforms and Win32 platforms. My problem is in deciding whether or not
>+ to try and use the standard C++ libraries or not. I know this sounds
>+ like a no-brainer at first, you would say "SURE". However, I have found
>+ that there seems to be no clear standard across all of these platforms
>+ as to what the C++ library standard is.
My recomendation is to pick a 3rd party library vendors who supports
the platforms you need. I use the Objectspace 2.0 implementation of
the STL on AIX, HP/UX, Solaris, and Windows NT. Until very recently
I was using the "native" STL implemented by P.J. Plauger that comes
Visual C++ and was* terribly* burned by it - it has numerous extremely fatal
bugs, and it's a bear to read to boot.
We just switched to Ospace on NT though, and and *much* happier. Another
good alternative is the "adapted" version of the SGI STL:
http://www.metabyte.com/~fbp/stl/index.html
I don't expect that vendor-supplied libraries will be close enough to
each other to be portable for at least 2 years. Compilers on different
platforms are still very far apart as well, unless you're using something
like KAI.
pedwards@cs.wright.edu (Phil Edwards) wrote:
>Never compare anything to Microsoft and expect it to be the same. I
>wouldn't even trust their ANSI library to really /be/ the ANSI library,
>even when they eventually produce one.
And they apparently don't them through any quality checks either! The STL
shipped with Visual C++ 4.2 was one of the biggest software debacles I've ever
seen. I've spent several man-months debugging PJP's twisted (and buggy) code.
-Adam
--
Adam Alpern, Brightware Inc.
alpern@brightware.com
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html ]
Author: Russ LeMaster <rlemaste@bellsouth.net>
Date: 1998/02/21 Raw View
Hi all,
I am currently developing an API that must be portable across most Unix
platforms and Win32 platforms. My problem is in deciding whether or not
to try and use the standard C++ libraries or not. I know this sounds
like a no-brainer at first, you would say "SURE". However, I have found
that there seems to be no clear standard across all of these platforms
as to what the C++ library standard is. For example, if you look at
Rogue Wave's "String" class (which comes with Borland C++) and compare
that to Microsofts implementation (can't remember where they got
theres). You see that each have their own member functions for carrying
out some of the neat things about threads. To make matters worse, if you
then move up to the Unix environment (where GNU Gcc, Solaris C++, and
HPUX C++) are being used, there seems to be the same problem.
Therefore, my question is, how are people handling this? Should I simply
throw out their standard and go with one of the freely available C++
standard library implementations out there or just plug about 50,000
#ifdefs in my code?
Thanks for any help on this in advance,
Russ
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html ]