Write Once Compile Anywhere

With reference to StlPort:

C++ has only recently been standardized.

Um, 5 years ago is recent?

December 1999, ratified February 2000, if I recall correctly. It's something like that anyway.

STL was put in during the last moments.

Yes. To write well in an STL style was a stretch for most C++ programmers at first. But nowadays, with the wealth of STL support libs and associated tools, and with most compilers finally treating the thing correctly, it's well accepted.

STL is not portable.

Tell that to the folk using ObjectSpace, RogueWave and StlPort, they're plainly programming in some kind of fantasy land...

Many compilers have not completely upgraded to the latest and final changes. Sadly, VC++6's compiler is incorrect. egcs wasn't complete either, last time I checked (which was a while ago, admittedly). Any news on this front?

Apparently StlPort is free, and available on many platforms, so who cares if VisualCeePlusPlus or EgCs? are wrong? Just use StlPort (or so the theory goes). As soon as I have time, I plan to try installing StlPort on my machines at home (BeOs, Linux, and Windows95, as soon as I get a newer copy of VisualCeePlusPlus for it).

Well, the STL won't compile properly if the compiler doesn't support templates correctly, ala GCC 2.7. However, having gone to the site and read the bug reports, it looks like StlPort is ok provided you use the latest compilers.

We have no problem using STL on multiple platforms. I don't think many commercial software products support as many platforms as we do and we use STL on each, even with GCC. -- RobertDiFalco

What version of GCC? I'm glad it's working now. By the way, the iostream libraries in VC++6's (really, PjPlauger's) STL don't work. However, I think StlPort will fix this.

GCC 2.952 or 2.96x. Really, I hate to bash such a great presence in the field of engineering, but the Plauger version of the Standard Library was atrocious since its first release and still is now. (BTW, I assume you are talking about the Standard C++ Library since PjPlauger never contributed an STL for MSDEV - this only contained just those parts of STL that were adopted by the Standard C++ Library). Anyway, I had written my own partial implementation of the Standard C++ Library that used the HP STL before any implementations every existed for MSVC. I was just shocked and horrified (both aesthetically and technically) when I saw the MSVC implementation and even more horrified when I saw that it was written by Plauger!! However, I'm not sure what you mean about the iostream libaries in VC6 not working. We use them all the time. Before we switched to StlPort, we used the Modena Library and the KaiCompiler? for our Unix platforms and MSVC (with its version of Dinkum libaries for NT. I know there was a problem mixing the old iostream library with the new standard library, but that's a different issue. One just has to make sure they are not using any of the old, legacy headers as these will link in the old iostreams library. You may want to check out DinkumWare's web site, the post fixes to the MSDEV stdlib implementation all the time. For those unaware, the version of the C++ stdlib in MSVC is provided by Dinkum and is a scaled down version of their retail library. -- RobertDiFalco

BTW, does the misuse of the term STL bother anyone else bug me? STL stands (or at least it used to stand for) StandardTemplateLibrary. StlPort started out as a Sun port of STL. Recently they added features for the entire CPP Standard Library. Notice there is no "T" in C++ Standard Library? A while back, the C++ Standards Committee decided to adopt a large portion of AlexanderStepanov's StandardTemplateLibrary. Some good things in STL were not taken, but it still really improved the C++ Standard Library. For some reason, mostly because Microsoft first shipped with the HP-STL but without the C++ Standard Library and later changed this to the DinkumWare version of the Standard Library, people started using STL to refer to the CppStdLib. Wow is this annoying. -- RobertDiFalco


CategoryCpp


EditText of this page (last edited August 16, 2006) or FindPage with title or text search