Solved

Which is the best public domain STL?

Posted on 2000-03-21
9
188 Views
Last Modified: 2011-10-03
Unless I hear otherwise, I will probably use the
gcc public domain STL, developed by SGI.

My hope is that I can use containers portably -
wish me luck.

Ken
0
Comment
Question by:klopter
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 2
9 Comments
 
LVL 22

Expert Comment

by:nietod
ID: 2641281
What compiler are you using?   As I indicated on your other question, porting STL from one compiler/platform to another can be difficult.  There are differences between compilers (most are unintentional) and there are differences between OSes (intentional) and most STL implimentations are written for a particular compiler/OS to insulate you from these differences.  If you port the STL to a diffferent compiler/OS you will probably find problems due to these differences.  

Usually you want to port the code that uses the STL, not the STL itself.

Recent copies of the GCC compiler and STL should be very close to standard.  That means that they will be very portable to other programs that are close to standard, which is more and more all the time.
0
 
LVL 11

Accepted Solution

by:
alexo earned 75 total points
ID: 2643368
www.stlport.org
Absolutely best (and multiplatform to boot!)
0
 

Author Comment

by:klopter
ID: 2644934
I have downloaded it and I will give it a try.

nietod - I respect your advice and
I will only use this as a backup.
In other words, I am going to use
gcc and cxx's STL, but I am also going
to make sure that I can use this STL
from stlport.

Ken
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 22

Expert Comment

by:nietod
ID: 2645026
Sound's reasonable.
0
 
LVL 11

Expert Comment

by:alexo
ID: 2648139
There are currently several problems with the standard library (which the STL is part of).
1) Bugs/deficiencies in the library implementation
2) Bugs/deficiencies/missing features in the underlying compiler

The people who brought you stlport tried to address both issues.

1) The library is free, open source and multiplatform.  That means that a lot of people will be able to spot and report bugs.  The active development means that these bugs are squished reasonably quickly.

2) stlport tries to address compilers "issues" by tailoring the code to known compilers (via #ifdef etc.) and either providing workarounds around the wrong behaviour or not making some features available on some platforms.

But there is only that much that they can do!  If you port your code from a good compiler to one whose template support is lacking, there *will* be features that just cannot be implemented on that compiler.  The good news is that if you use a good multiplatform library implementation you'll catch the errors at compile time.
0
 
LVL 22

Expert Comment

by:nietod
ID: 2648724
The vast majority of errers that will occur will be compile-time errors.  I compile my programs under VC, but in an effort to keep ite more portable every few months or so I compile it under BCB.  BCB will catch mistakes (non-standard syntax type things) that VC missed. It usually takes a few hours to correct al the mistakes and then the code will compile under both and as far as I have ever seen, work correctly under both.  As both VC and BCB advance they get more standard so this becomes easier to do with time.  That should be your experience too.  The longer you wait to port, the less problems you will have.
0
 

Author Comment

by:klopter
ID: 2649079
This all sounds very promising.

I doubt that I will have any trouble with STL.
Right now I am only using lists and vectors.
I am hopeful that I won't have much difficulty
finding a subset of functions within these that
work well.

Ken
0
 
LVL 11

Expert Comment

by:alexo
ID: 2650510
>> As both VC and BCB advance they get more standard [...]

True for BCB but unfortunately MS is not very concerned with the standard.
0
 
LVL 22

Expert Comment

by:nietod
ID: 2653084
Why do you say that?  it has become more standard in each release  (Although the fact that scope of a varable declared in a for loop still isn't right is good support for your point.)  MS had several representatives on the committee.  (Maybe they were just there to try to get the windows API included in the standard library.)
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question