STL Vector on Borland tools
I have a problem. For a variety of reasons I am using, and cannot change from, Borland compilers to write the bulk of my software. My experience though has suggested that the Rogue Wave STL Vector is very broken. Since I dislike using compiler-specific structures, Borland's equivalent types such as TArray aren't really satisfactor. It's the heavy use of compiler-specific features by a predecessor that has tied me to a particularly ancient version of the Borland tools, and I really want to get away from that.
Are there solutions for the broken vector problem? Do I just need to change compilation/linking options, or can I easily substitute another vector library? Am I completely shafted?
Clay Dowling
Thursday, December 18, 2003
Can't you just use another STL library? Or do you suspect it is the compiler that is broken, and not your particular STL implementation?
SGI hosts an STL library for download I believe. Google reveals all.
Mitch & Murray (from downtown)
Thursday, December 18, 2003
What exactly is broken?
Related to another thread:
vector<T>::iterator is not necessarily T*.
If your code assumes this, then your code is broken.
If you need a 3rd party STL, try http://www.stlport.org/
Beware, though: STLport's vector<T>::iterator is not T*...
David Jones
Thursday, December 18, 2003
I'll second the vote for STLPort ( http://www.stlport.org ).
It's a very robust implementation that's been around a long time now (in STL time at least); its support for compilers is second to none. Plus, it has some STL inspired non-standard classes that are truly interesting (like rope).
It also looks like Borland C++ Builder now ships with STLPort as its STL.
Incidentally, what version of Borland C++ are you using? I know that in the past some versions (5.0 maybe... been too long) had some real trouble with template expansion (espcially expanding templates it shouldn't).
Mark Smith
Thursday, December 18, 2003
What exactly is the problem? I use std::vector with Borland C++ Builder 5, and I can't say I've had problems that weren't caused by my own programming errors.
Roel Schroeven
Thursday, December 18, 2003
STLport is great!
runtime
Thursday, December 18, 2003
Borland C++ 5 and C++ Builder 5 are different products.
Borland C++ is what grew/splintered from the old Turbo C++ and was Borland's main command line compiler and simple IDE product line for many years. C++ Builder supplanted it some time after the introduction of Delphi: C++ Builder was touted as Delphi for C++ programmers (with the same cutting edge RAD features) as I recall.
To talk about Borland C++ is to talk about a product that is 5-10+ years old. I assume that this is what the original poster is in reference to when he references "ancient" Borland development tools.
Mark Smith
Thursday, December 18, 2003
Ancient as in 5.02, that is correct. It's an old dog, and all copies in circulation should have been destroyed. Unfortunately my client has staked his academic career on writing a series of plug-ins for a package that was written with 5.02 specific features. Trust me, if I had any say in this at all I wouldn't be using this compiler. I recognize it for the stinking heap of fertilizer that it is.
I'll check out STLPort. The older version is Rogue Wave, and its always been a little dicey. It's still around in C++ Builder 4, but I'm glad to hear that it's gone the way of the DoDo in the latest version. I've also considered implementing my features as a DLL, using Dev-C++. The STL there works just fine, thank you very much.
Clay Dowling
Thursday, December 18, 2003
Just curious... which 5.02 specific features?
Are we talking about OWL?
Mark Smith
Thursday, December 18, 2003
OWL, Borland specific String extensions (boy howdy, do I have string libraries; 3 variations on "string" at last count), and the ever lovley extra special lack of exceptions. The compiler claims to support them, but even when they're part of the compile options they never seem to get thrown.
In short, it's a dinosaur well deserving of harsh Darwinian outcomes.
Clay Dowling
Thursday, December 18, 2003
Just tried STLport. It makes the Rogue Wave STL look like a gem. It refuses to compile, and makes some pretty wild and inaccurate assumptions about where include files are at. The current shipping version makes references include files that according to the include path should be appearing in the STLport distribution. Unfortunately they should be appearing in non-existent directories.
My advice: stay far away from this software. Maybe the release I grabbed was defective in some way. Maybe they just like to label random CVS snapshots as release code (and yes Virginia, I checked to make sure that it was the release version). Either way, it's useless as it ships from STLport.
Clay Dowling
Friday, December 26, 2003
Recent Topics
Fog Creek Home
|