[WTL] STLport安装指南

2023-11-08

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.

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

[WTL] STLport安装指南 的相关文章

  • 在QML中动态创建ListModel

    当我需要在运行时创建任何 QML 组件时 我可以使用该指南 http qt project org doc qt 5 qtqml javascript dynamicobjectcreation html http qt project o
  • 需要裁剪+调整大小约 300000 个文件。运行时间 = 4 天以上。如何加快 bash 脚本的速度?

    我正在努力创建视频间隔拍摄 我拍摄的所有照片都是以 4 3 宽高比拍摄的 jpg 图像 2592x1944 分辨率 我希望它们在 1920x1080 下均为 16 9 我写了一个小脚本来执行此操作 但过程不是很快 我花了大约 17 分钟来裁
  • 是否可以在 C++ 运行时动态创建函数?

    C 是一种静态的编译语言 模板在编译时解析等等 但是是否有可能在运行时创建一个函数 该函数未在源代码中描述 并且在编译期间未转换为机器语言 以便用户可以向其抛出源代码中未预期的数据 我知道这不可能以直接的方式发生 但肯定是可能的 有很多编程
  • 混合运行时是可行的解决方案吗?

    在我的公司 我们最近从 VC9 切换到 VC10 我们迁移了我们的项目 但是负责人告诉我们 我们必须在我们的生产机器上保留一些用 VC9 编译的基本通用 DLL 一段时间 这些 DLL 使用自定义结构 其中一些包含std vector st
  • 处理大型数组而不会出现运行时错误

    当我使用大小为 10 5 10 5 的数组 例如int a 100000 100000 由于该数组消耗更多内存 这可能是运行时错误的原因之一 我应该如何声明这个数组 二维数组 例如int a 100000 100000 这样我就可以应对问题
  • 什么是运行时环境?

    有人可以用简单的术语解释一下这意味着什么吗 是指应用程序代码运行的环境 DOS Windows Linux 等 吗 将其与开发环境和构建环境区分开来 您往往会在这里找到层次结构 运行时环境 执行程序所需的一切 但没有工具可以更改它 构建环境
  • PHP Yii:运行时数据库连接

    我想在运行时使用 Yii 连接到第二个数据库 数据库名称将来自用户登录后的数据库表 我在教程中看到我应该这样做 db2 Yii createComponent array class gt EMongoClient server gt mo
  • 将行添加到 WPF 数据网格,其中列直到运行时才知道

    我正在尝试将数据添加到数据网格 事实上 任何在网格中呈现数据的控件都可以 但列 名称和数字 直到运行时才知道 我知道如何创建的专栏 例如 DataGridTextColumn textColumn new DataGridTextColum
  • Big O:如何根据外部 for 循环确定 for 循环增量的运行时间?

    我有以下算法 运行时复杂度为 O N 2 但我想对其有更深入的了解 而不是仅仅记住常见的运行时 分解和分析它的正确方法是什么i 1考虑在内层 for 循环中吗 void printunorderedPairs int array for i
  • Log(n) 中的 Tetranacci 数

    我偶然发现一个问题 需要我计算第n个四联数 https en wikipedia org wiki Generalizations of Fibonacci numbers Tetranacci numbers时间复杂度为 O log n
  • C、运行时测试 PATH 中是否存在可执行文件

    我目前正在用 C 语言编写一个应用程序 目标是 BSD 和 Linux 系统 希望能够普遍移植 该程序具有运行时依赖项 在本例中为 mplayer 就目前情况而言 我正在使用execlp 启动 mplayer 我正在检查 execlp 调用
  • 使用 java 中的参数执行 shell 脚本

    我已经用谷歌搜索了一段时间 每个人似乎都有不同的解决方案 但似乎没有一个对我有用 我都尝试过ProcessBuilder and Runtime 两者都调用 sh直接文件并将其输入 bin bash 没有运气 回到基础 我当前的代码如下 S
  • 什么时候插入排序比合并排序快?

    对于家庭作业问题 我被告知插入排序以 8n 2 运行 合并排序以 64 n lg n 运行 作为我得到的解决方案的一部分 它说只要 n 它来自这个 代数 推理路线 steps in insertion sort lt steps in me
  • spring 在运行时添加数据源

    我正在开发一个带有每个租户数据库策略的 Spring Boot 多租户应用程序 要求是在运行时添加新数据库 这意味着我必须动态创建新的数据源对象 我还研究了 Spring 的 AbstractRoutingDataSource 但需要预定义
  • 无法调试,致命信号 6 (SIGABRT) 位于 0x00007c37(代码=-6)

    我遇到了以下情况 无法调试 Android 应用程序 我可以运行它 但无法调试它 我开始了全新的项目 复制了所有内容并且它有效 意味着能够调试 但又得到了这个 我在模拟器和手机上都尝试过 但没有成功 我使用的是Android Studio
  • MS 缺少 VSTO 4.0 运行时下载?

    我们有代码检查 VSTO 4 0 运行时是否存在并下载 如果丢失 直到今天这一切都运作良好 MS 中的 VSTO 运行时文件似乎丢失了 有人对这个有了解吗 我们能否告诉客户这是 MS 问题并且很快就会得到解决 Google 没有找到任何有关
  • 使用 eval 加载模块

    我在 Perl 和内置函数方面遇到了一些麻烦eval http perldoc perl org functions eval html 我浏览了网络 但找不到任何答案或示例代码 我想动态加载模块 在执行时间之前我不知道它们 module
  • 未确定的泛型类型在 ghci 的运行时中如何表示

    我很清楚通用函数和通用数据类型 在泛型类型中 data SB forall x show x gt SB x instance Show SB where show SB x show x 所以对于任何给定类型x 如果它有一个签名Show
  • 如何列出运行时函数的所有调用?

    有什么办法可以list 在VS中显示 写入文件 所有来电者 对象 函数 一个函数的当程序运行时 可能使用调试器 我需要record 所有通话 包括来电者 一个函数的从计划启动到终止 简单扫描源代码或二进制文件不做这份工作因为该程序可以作为服
  • 运行时 SQL 查询生成器

    我的问题类似于 Java中有什么好的动态SQL生成器库吗 https stackoverflow com questions 5620985 is there any good dynamic sql builder library in

随机推荐