1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/ossrv/genericopenlibs/cppstdlib/stl/INSTALL Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,171 @@
1.4 +**********************************************************************
1.5 +* INSTALL file for STLport 5.0 *
1.6 +* *
1.7 +**********************************************************************
1.8 +
1.9 +STLport is a full ANSI C++ Standard library.
1.10 +
1.11 +This distribution contains STLport sources only, no binaries.
1.12 +To use STLport iostreams, locale and complex numbers, you have to build STLport
1.13 +library from sources in "build/lib" directory and link your programs with it.
1.14 +
1.15 +Starting with 5.0 the 'wrapper' mode is not supported anymore. You cannot use native
1.16 +compiler iostreams implementation with STLport STL (see doc/FAQ for explanations).
1.17 +Now you have to choose between STLport iostreams or no iostreams.
1.18 +
1.19 +==== Unpacking and installing STLport ==========
1.20 +
1.21 +1) Unpack STLport archive to a directory accessible during compilation.
1.22 + NOTE: DO NOT overwrite header files coming with the compiler, even if you made
1.23 + a backup - this won't work! Most probably, you've already unpacked the archive before
1.24 + reading this file though ;)
1.25 +
1.26 +2) Make sure "stlport" directory of this distribution comes before compiler's one
1.27 + in your include paths when you compile the project.
1.28 +
1.29 + Note: for SunPro CC 5.0 and higher, there used to be special directory "stlport/SC5"
1.30 + this is now obsolete, please make sure you do not use it anymore.
1.31 +
1.32 +3) Make sure you do not rename this "stlport" subdirectory -
1.33 + that may result in compilation errors.
1.34 +
1.35 + NOTE: Your compiler should be recognized by STLport source code with no configuring.
1.36 + Please edit appropriate configuration header for your compiler
1.37 + directly if you have to make compiler-specific configuration changes
1.38 + (see stlport/config).
1.39 +
1.40 +
1.41 +4) Go to "build/lib" subdirectory. It contains various makefiles for different
1.42 + compilers and 'make' utilities (GNU Make and Microsoft's nmake supported).
1.43 + If you are not able to find makefile for your particular
1.44 + compiler, please use one that looks most similar to your make engine to
1.45 + create your own.
1.46 +
1.47 + Verify you can do command line compiles. IDE users may have to do something
1.48 + special, like add environment variables (for Microsoft) or install
1.49 + additional compiler components (for Metrowerks), before they can use their
1.50 + command line compilers (see doc/README.xxxx for additionnal inrformation).
1.51 +
1.52 + IMPORTANT:
1.53 +
1.54 + If you DO NOT plan to use STLport iostreams and/or locale implementation but just
1.55 + the STL, you do not have to build the library.
1.56 +
1.57 + If you have decided to disable STLport iostreams and locale using _STLP_NO_IOSTREAMS
1.58 + configuration macro in stlport/stl/config/user_config.h, you may stop reading here.
1.59 +
1.60 +
1.61 +==== Building STLport iostreams library ==========
1.62 +
1.63 +Below are step-by-step instructions to build STLport streams library. This is a general
1.64 +build process description, for a more detailed one check README files in the doc folder:
1.65 +
1.66 +5) Using appropriate makefile, do
1.67 +
1.68 + make -f <compiler name>.mak clean
1.69 + make -f <compiler name>.mak install
1.70 +
1.71 + to build the STLport libraries. Makefiles are set up to build several different
1.72 + flavors - debug/nondebug, static/dynamic versions. But not all flavors will be build
1.73 + by default. See build/lib/README and build/lib/README.options for other make tagets.
1.74 +
1.75 + Note: your "make" program may have different name, like "nmake" for Visual C++.
1.76 +
1.77 + Examples :
1.78 + 1. If you are building STLport for just one compiler, you may do something like that
1.79 + (DOS syntax for Visual C++ below):
1.80 + nmake /fnmake-vc6.mak clean
1.81 + nmake /fnmake-vc6.mak install
1.82 +
1.83 + 2. If you plan to build STLport with multiple compilers, use "make -f" :
1.84 + make -f gcc.mak clean install
1.85 + make -f sunpro.mak clean install
1.86 +
1.87 +
1.88 + Note: 'install' target work slightly different than usual - it installs libraries into
1.89 + <STLport root dir>/lib and bin catalog, NOT IN SYSTEM CATALOG. You can do the system
1.90 + install by just copying stlport and lib folder to the destination of your choise. For
1.91 + example on UNIX-like platforms this can be done with the following commands:
1.92 +
1.93 + su
1.94 + tar cf - stlport | (cd /usr/local/include; tar xf -)
1.95 + chmod -R a+r /usr/local/include/stlport
1.96 + chown -R root:root /usr/local/include/stlport
1.97 + (cd lib; tar cf - --exclude=CVS --exclude=.cvsignore .) | (cd /usr/local/lib; tar xf -)
1.98 + chown -R root:root /usr/local/lib/libstlport*
1.99 + exit
1.100 +
1.101 + Note: System install is optional, most of compilers/linkers support searching for includes
1.102 + and libs throught out the whole filesystem, just check your documentation on how to achieve
1.103 + this.
1.104 +
1.105 + If you use cross-compiler, you can find libraries in the <STLport root dir>/lib/<target platform>
1.106 + catalog.
1.107 +
1.108 +6) If build fails, you may choose to :
1.109 + - try fixing the build ;)
1.110 + - wait until somebody else will submit corresponding changes to be incorporated in next STLport
1.111 + release/snapshot.
1.112 +
1.113 + In case you do patch STLport, please submit your patches to
1.114 + https://sourceforge.net/tracker/?atid=766246&group_id=146814&func=browse
1.115 +
1.116 +==== Linking your application with STLport library ==========
1.117 +
1.118 +7) Check the build:
1.119 +
1.120 + Example:
1.121 +
1.122 + - under Linux and other Unixes:
1.123 +
1.124 + cd build/test/unit
1.125 + make -f <compiler name>.mak install
1.126 + ../../../bin/stl_unit_test
1.127 + ../../../bin-g/stl_unit_test
1.128 +
1.129 + - under Windows:
1.130 +
1.131 + cd build\test\unit
1.132 + nmake /fnmake-<compiler name>.mak install
1.133 + cd ..\..\..\bin
1.134 + stl_unit_test_r50
1.135 + stl_unit_test_d50
1.136 + stl_unit_test_stld50
1.137 +
1.138 +8) Supply the "lib" subdirectory to the library search path and add desired
1.139 + library to the list of libraries to link with.
1.140 + Examples (imagine you have mytest.cpp in the same directory as this file is):
1.141 + With GCC : g++ -pthread -I./stlport mytest.cpp -L./lib/ -lstlport
1.142 + With DEC CC : cxx -I./stlport mytest.cpp -L./lib/ -lstlport
1.143 + With SUN CC : CC -mt -I./stlport mytest.cpp -L./lib/ -lstlport
1.144 + .....
1.145 + [ Visual C++ specific ] For (embedded) VC++, you do not have to specify
1.146 + "stlport_XXX.lib" explicitly, as it is being choosen and forced to link
1.147 + automatically by "#pragma"'s in compiler config file in
1.148 + stlport/config/stl_msvc.h. Appropriate version is being selected based on
1.149 + /MD[d] vs /MT[d] options and _STLP_DEBUG setting. All you have to do is
1.150 + to set library search path for the linker.
1.151 + Example :
1.152 + cl.exe /I.\stlport mytest.cpp /link /libpath:.\lib /MD
1.153 +
1.154 +9) If you linked your application with shared STLport library (.so or .dll), please
1.155 + make your .so or .dll can be found by the dynamic linker.
1.156 + Under Windows, the paths searched depend on the particular flavor, see the MSDN
1.157 + documentation for LoadLibrary at http://msdn.microsoft.com. Easiest ways are to
1.158 + either modify the PATH environment variable or copy all .dll's next to the
1.159 + executable.
1.160 + Under Linux, the environment variable LD_LIBRARY_PATH can be adjusted to point
1.161 + to the dir containing. See the manpage for ld.so for more info.
1.162 +
1.163 +10) STLport builds only multithreaded libraries, so your application should be compiled
1.164 + as multithreaded, too. Use -pthread (or -pthreads on Solaris) option for GCC, -mt for SunPro,
1.165 + /MT for VC, and so on. Sometimes you should define _REENTRANT or something else, depends
1.166 + upon platform/compiler. See compiler's and linker's options on command line when you build
1.167 + unit tests (build/test/unit) for reference. The last is useful for ANY platform (special
1.168 + attention for Windows users).
1.169 +
1.170 +11) Don't hesitate to read READMEs (doc/README*, build/lib/README*, build/test/unit/README*)
1.171 + and doc/FAQ.
1.172 +
1.173 +12) Have fun!
1.174 +