stlport安装指南
stlport-4.6 是完全兼容ansi c++标准的类库。
this distribution contains stlport sources only, no binaries.
to use stlport iostreams, you have to build stlport library from sources in "src"
directory and link your programs with it.
这个发布包仅仅包括stlport源代码马,不含二进制发布软件包。必须重新编译src目录下的代码才可以使用stlport iostreams类库。
this is major change since pre-4.0 releases, please read the instructions carefully.
这是自4.0版本发布以来的重要变更版本,请仔细的阅读下面的操作指南。
==== unpacking and installing stlport ==========
解包和安装stlport
1) unpack stlport archive to a directory accessible during compilation.
note : do not overwrite header files coming with the compiler, even if you made
a backup - this won't work ! most probably, you've already unpacked the archive before
reading this file though ;)
首先吧stlport安装包解压缩到一个目录。注意:不要覆盖了编译器自带的头文件,即使你已经做了备份,也不要这么做!
2) make sure "stlport" directory of this distribution comes before compiler's one
in your search path when you compile the project;
确保stlport目录在编译器自带的头文件搜索路径之前
note: for sunpro cc 5.0 and higher, there used to be special directory "stlport/sc5"
this is now obsolete, please make sure you do not use it anymore.
注意:对于sunpro cc 5.0或者更高版本,有一个特殊的目录stlport/sc5,这个目录已经背废弃了,请不要再使用这个目录。
3) make sure you do not rename this "stlport" subdirectory -
that may result in compilation errors.
确保不要修改stlport的子目录名称,否则会导致编译错误
note : do not attempt to run "configure" ! it is deprecated, moved to safe standalone folder
and should be used as a helper to create initial config for a new compiler only.
your compiler should be recognized by stlport source code with no configuring.
please edit appropriate configuration header for your compiler
directly if you have to make compiler-specific configuration changes.
注意:不要尝试运行configure命令,该方法已经废弃不用了,已经移到一个安全单独的目录,只能用于作为为新编译器的创建初始配置的辅助手段。您使用的编译器应该能够被stlport的源代码识别,如果需要针对您使用的编译器进行特殊的配置,请直接修改适当的头文件。
4) go to "src" subdirectory. it contains various makefiles for different
compilers. if you are not able to find makefile for your particular
compiler, please use one that looks most similar to your make engine to
create your own.
直接进入src目录,这个目录包含了各种不同编译器使用的make文件,请选择一个和你的编译器相似的make文件。
verify you can do command line compiles. ide users may have to do something
special, like add environment variables (for microsoft) or install
additional compiler components (for metrowerks), before they can use their
command line compilers.
必须在命令行方式编译,使用ide编译需要设置一些环境变量(微软)或者安装特殊的编译组件(metrowerks)。
important :
if you do not plan to use stlport iostreams implementation, you do not have to build the library.
please do this instead :
如果你不需要使用stlport iostream类库,你不必编译整个类库,请使用下面的方法
4-1) using appropriate makefile, do "make -f <your compiler name>.mak prepare".
please do not skip this! on some platforms, it creates necessary symbolic links.
if you do build stlport iostream, this step is performed automatically when you do "make all".
使用适当的make文件,执行“make -f <your compiler name>.mak prepare”命令,不要跳过这步!在一些平台上,它创建了一些符号链接。在需要编译stlport库时,这个步骤是由“make all”自动完成的
4-2) uncomment _stlp_no_own_iostreams setting in "stlport/stl_user_config.h" to disable use
of stlport iostreams and to use wrappers around your existing iostreams.
after disabling stlport iostreams, you will use wrappers around your compiler's iostreams
libabry, as in previous stlport releases.
no binary library for stlport needs to be built in this case.
note though :
- new-style ansi iostreams may not be available on your system;
- compiler's iostreams are most likely slower than stlport version.
删除stlport/stl_user_config.h文件中_stlp_no_own_iostreams编译常量的注释禁止使用stlport iostream类库,并且使用已经存在的iostream类库的封装类。在这种情况下不需要重建stlport二进制类库。