|
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.
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:
- Unpack STLport as described in "Install" document.
- Go to "src" subdirectory. It contains 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.
- 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"
- If make fails, you may try fixing the build yourself and/or report it to STLport Forum.
- 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.
|