`
kerlubasola
  • 浏览: 676249 次
文章分类
社区版块
存档分类
最新评论

STLport 4.6安装指南

 
阅读更多

ICE专题:STLport 4.6安装指南

ICE的C++编译需要使用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二进制类库。
If you have decided to disable STLport iostreams, you may stop reading here.
如果你已经决定不使用STLport iostream类库,可以不用往下阅读了。
==== Building STLport iostreams library ==========
Below are step-by-step instructions to build STLport streams library:
下面是一步一步的教你编译STLport stream类库
5) Using appropriate makefile, do "make clean all" to build the STLport libraries
(makefiles are set up to build several different flavors - debug/nondebug,
static/dynamic versions).
Optionally, do "make install" to copy STLport headers and libraries to shared location.
选 择适当的make文件,执行make clean all编译STLport库,make文件设置了集中不同的编译方式-debug/nondebug和static/dynamic版本。可选的,执行 make install拷贝STLport的头文件和库文件到共享的位置。
Note : your "make" program may have different name, like "nmake" for Visual C++.
注意:make文件可能有不同的名称,VC使用nmake
Examples :
1. If you are building STLport for just one compiler, you may do something like that
(DOS syntax for Visual C++ below):
copy vc6.mak makefile
nmake clean all
nmake install
例如:
1.如果你只是为一种编译器编译STLport,方法如下:
copy vc6.mak makefile
nmake clean all
nmake install
2. If you plan to build STLport with multiple compilers, use "make -f" :
make -f gcc.mak clean install
make -f sunpro.mak clean install
This will build and install STLport for gcc & SUN CC.
2.为多个编译器编译STLport,使用make –f
make -f gcc.mak clean install
make -f sunpro.mak clean install
这会编译和安装STLport gcc和SUN CC两个版本。
"install" target works on most platforms.
install编译依赖目标几乎在所有的平台上可以使用。
On Win32, it does the following :
- copies STLport headers in "stlport" subdirectory of your compiler's INCLUDE directory;
- copies STLport .lib files in your compiler's LIB directory;
- copies STLport DLLs to Windows system directory so they can be found at runtime.
在Win32平台上,install目标做了下面的工作:
-拷贝STLport的头文件到编译器的INCLUDE目录
-拷贝STLport.lib到编译器的LIB目录
-拷贝STLport DLL库到Windows的系统目录
On UNIX, it does the following :
- copies STLport headers in "stlport" subdirectory of system's local include directory (default is /usr/local/include);
- copies STLport .a and .so files to system local library directory (default is /usr/local/lib);
在UNIX平台上,它完成了下面的工作
-拷贝STLport头文件到系统local include目录(默认是/usr/local/include)
-拷贝STLport.a和.so文件到系统的local库文件目录(默认为/usr/local/lib)
6) If build fails, you may choose to :
- try fixing the build ;
- wait until somebody else will submit corresponding changes to be incorporated in next STLport
release/snapshot. To use STLport w/o its own iostreams, please do step 3a).
In case you do patch STLport, please submit your patches to support@stlport.com or (better)
to STLport Forum (http://www.stlport.com/cgi-bin/forum/dcboard.cgi)
如果编译失败,你可以:
-试着修改相关文件重新编译
-等待其他人发现同样的问题,这STLport的下个发布中修改
既然你已经为STLport打了补丁,请把你的补丁发送到support@stlport.com或者(最好使用这种方式)STLport Forum(http://www.stlport.com/cgi-bin/forum/dcboard.cgi)
7) Do "make install" to install resulting libraries into "./lib" subdirectory.
执行make install安装编译产生的库到/lib目录
==== Linking your application with STLport library ==========
链接应用程序到STLport库文件
8) Supply the "lib" subdirectory to the library search path and add desired
library to the list of libraries to link with.
把lib目录加入到库文件的搜索路径中并且指定要链接的库名称。
Examples (imagine you have mytest.cpp in the same directory as this file is):
With gcc : gcc -I./stlport mytest.cpp -L./lib/ -lstlport_gcc
With DEC CC : cxx -I./stlport mytest.cpp -L./lib/ -lstlport_deccxx
With SUN CC : CC -I./stlport mytest.cpp -L./lib/ -lstlport_sunpro
.....
例如:
-gcc,gcc -I./stlport mytest.cpp -L./lib/ -lstlport_gcc
-DEC CC,cxx -I./stlport mytest.cpp -L./lib/ -lstlport_deccxx
-SUN CC,CC -I./stlport mytest.cpp -L./lib/ -lstlport_sunpro
……
[ Visual C++ specific ] For VC++, you do not have to specify "stlport-msvc-XXX.lib" explicitly,
as it is being choosen and forced to link automatically by "#pragma"'s in stlport/config/stl_select_lib.h.
Appropriate version is being selected based on /MD[d] vs /MT[d] options and __STL_DEBUG setting.
All you have to do is to set library search path for the linker.
Example :
cl.exe /I./stlport mytest.cpp /link /libpath:./lib /MD
-VC比较特殊,不需要显式的指定stlport-msvc-XXX.lib库文件,而是在 stlport/config/stl_select_lib.h头文件中使用#pragma指令自动选择了链接的库文件。有些版本基于/MD[d] vs /MT[d]编译选项编译,以及设置了__STL_DEBUG编译常量。只需要按照下面的设置即可:
cl.exe /I./stlport mytest.cpp /link /libpath:./lib /MD
9) If you linked your application with shared STLport library (.so or .dll), please make your .so or
.dll's to be found in PATH at runtime. On Windows, the simplest way to do it
is to copy all .dll's to Windows system directory. Or, you might choose to add directory
containing STLport to the PATH environment string.
10) Have fun !
10/31/03, Boris Fomitchev.

分享到:
评论

相关推荐

    STLPort编译安装指南

    介绍VC下对STLPort的编译安装方法介绍VC下对STLPort的编译安装方法介绍VC下对STLPort的编译安装方法

    STLport-4.6

    stl C++ 类库 适合 VC GCC

    VC++ STLPORT安装包 附安装说明

    (1) 设置环境变量,使得环境变量PATH中包含C:\Program Files\Microsoft Visual Studio\VC98\...(5) 选择Include files,加入C:\STLPORT\STLPORT,并调到最前面 选择Library files,加入C:\STLPORT\LIB,并调到最前面

    STLport-5.2.1及安装方法

    stlport 开发包 版本5.2.1 .使用stlport 的朋友可以下载

    stlport5.2.1的安装

    里面有一个文件,清楚的告诉你了,安装stlport的详细步骤。大家看了应该都会。 我花了一天的时间在弄号的。值得借鉴。 如还有不明白的可以qq联系我。 QQ:648933788

    VS2008+Boost 1_46_1+STLPort-5.2.1安装及使用配置手记

    这个资料仅仅是关于如何在vs2008下安装 Boost 1_46_1和STLPort-5.2.1的教程,你要严格按照说明去做,肯定能成功。我建议在写配置文件时,一定要看清楚空格,我就因为空格问题浪费了很长的时间在排错。祝你好运。。。...

    STLport5.1.5在VC6.0下的安装及使用

    经常在Windows/Linux两种平台下开发程序,而字符串的处理也非常重要,于是想找一种跨平台的...当然了,它还有很多其它的功能,也非常好. 本文对在VC6环境下安装,使用STLport5.1.5作了简单介绍,侧重在安装及使用配置上.

    stlport 4.6.2 编好的版本

    stlport 4.6.2 编好的版本 stlport 4.6.2 编好的版本

    STLport-4.0 绝版

    STLport STL VC6库 没有比这个更的程序的使VC6.0支技,标准STL。 

    stlport 5.1.6

    stlport 开发包 版本5.1.6 .使用stlport 的朋友可以下载

    STLport-5.2.1已编译版

    这是STLport的v5.2.1,已用MinGw编译,包含头文件(stlport)3个动态库和3个静态库

    STLport-2.033

    sgi stl 2.x对应在stlport中版本,可阅读性比较强的版本,只是我还没有想法在vc6中安装,如果有人想到办法了,发个信息给我吧,谢谢了email:417230766@qq.com

    stlport 5.2.0

    stlport 开发包 版本5.2.0 .使用stlport 的朋友可以下载

    stlport5.2.1

    stlport 开发包 版本5.2.1 .使用stlport 的朋友可以下载

    stlport 5.2.1

    stlport SGLSTL STL 源码剖析 侯捷 C++ 5.2.1stlport SGLSTL STL 源码剖析 侯捷 C++ 5.2.1

    STLPort 库文件

    STLPort编译后库文件,VC6直接使用

    STLport-5.2.1

    这个是STLport站点上的STL实现版本(5.2.1)。仅供参考

    STLport V5.2.1

    这是STLport 的最新版V5.2.1,编译方式有些改动,具体方法请参考网上资料。

    STLPort标准库

    STLport 是一个多平台的 ANSI C++ 标准类库实现,具备很多高级特征,并且为效率,异常安全性和线程安全性做了优化,还做了许多扩展

    STLPort的文档.rar_STL_stlport_stlport c

    STLPort的文档(英文)

Global site tag (gtag.js) - Google Analytics