STLport.org - "Templates that fit"
Contents
Introduction
  About STLport
  SGI STL Base
  STLport Story

STLport Features
  Portability
  Debug Mode
  Thread Safety
  Exception Safety

Getting Started
  Download and Install
  Select Streams Mode
  Compiling with STLport

White Papers
  Release Notes
  READMEs
  Interface with std::
  Wrappers
  Config manual
  Regression Test
  Exception Test

Feedback
  Bug Reports
  Forum

Appendix
  Acknowledgements
  Your Free Licence

Selecting IOStreams Mode

Major IOStream Modes

STLport 4.0 may be used in two different major modes :
  • With SGI iostreams (default). In this mode, you are going to use iostreams and complex libraries provided by STLport. To do so, first you have to build STLport library from sources provided in "src" subdirectory and link your programs with it. This is major change since pre-4.0 releases, please read the instructions carefully.
  • Without SGI iostreams. In this mode, STLport will use wrappers around your compiler's iostreams and complex libraries, just like in STLport releases prior to 4.0.
For any of these modes, please make sure "stlport" directory containing header files is the first one in your include search path when you compile the project
Note: for SunPro CC 5.0 and higher, there is special directory "stlport/SC5" to be set in search path due to specific SUNpro search rules)

Installing STLport for use without SGI iostreams

In this mode, you will use wrappers around your compiler's iostreams libabry, as in previous STLport releases. All you have to do to use STLport in this mode is to uncomment __STL_NO_SGI_IOSTREAMS setting in "stlport/stl/_site_config.h" to disable use of SGI iostreams and to use wrappers around your existing iostreams. Note though :
  • New-style ANSI iostreams and/or complex library may not be provided by your compiler vendor;
  • If provided, vendor iostreams are most likely slower than SGI version.
If you have decided to disable SGI iostreams, you may stop reading here. To use wrapper mode, you do not have to build any binary libraries, as everything you need is contained in the header files already.

Building STLport iostreams library (Default Mode)

In this mode, you will use SGI implementation of iostreams instead of the one that comes with your compiler. It does contain some non-template code so you have to build STLport iostreams library in "src" directory to link your project with. Below are step-by-step instructions to build STLport library:
  1. Do make sure you have followed instructions for default installation above.
  2. Go to "src" subdirectory. It contains various makefiles for different compilers. If iostreams library is not yet ported to your compiler (please see Release Notes for details), you may revert to use no-SGI-iostreams mode or port it. Please refer to porting document to learn how to port iostreams library to your compiler. The porting procedure is usually straightforward on UNIXes.
  3. Using appropriate makefile, do "make clean all" to build STLport libraries (makefiles are set up to build several different flavors - debug/nondebug, static/dynamic versions). Note : your make program may have different name, like "nmake" for Visual C++, so, with "nmake", do "nmake clean all"
  4. If make fails, you may try fixing the build yourself and/or report it to STLport Forum.
  5. Do "make install" to install resulting libraries into "lib" subdirectory. On Windows, this step also copies .dll libraries to system directory to be accessible at runtime.

Testing STLport

STLport provides two test suites - regression test and exception handling test.
It is recommended that you build and run them in place to verify your new STLport installation is OK.

 


Copyright © 1999,2000 by Boris Fomitchev.    Last modified: July 14, 2000