如何安装stlport 4.6.2?

解决方案 »

  1.   

    详细请阅读stl port附带的readme 和 insatall 说明,
    主要的几个步骤是: 
    1、build,根据说明文件,使用nmake.exe进行链接
    2、修改vs的ide路径设置,把stl port 所在路径添加到vs的include路径和lib路径,
      

  2.   

    下面是用软件自动翻译install的结果,供参考:
    ************************************ ****************************** *安装文件stlport 5.0 * * * * * ************************************ **************************** stlport是一个完整的ANSI C++标准库. 这种分配包含stlport唯一来源,没有可执行文件. 使用stlport iostreams ,现场和复数, 要建图书馆stlport从源头"建设/库"目录和连接你的节目. 从5.0 '包装'模式是不支持了. 你不能使用母语编译iostreams执行stlport的STL (见文档/常见解释) . 现在你要选择stlport iostreams或没有iostreams . =====拆包并安装stlport ========== 1 )解压stlport档案目录查阅整理期间. 注:不复盖的头文件而来的编译器,即使你做一个备份,这是不行的! 小虫 你已经解压的档案之前阅读这份文件虽; ) 2 )做到" stlport "名录,这是分布 编译前的人,包括你的路径,当您在编译该项目. 注: sunpro消委会5.0及更高版本,也有特殊的目录" stlport/sc5 "这是现在已经过时了, 请确保你不使用它了. 3 )使你不改名这个" stlport "子目录中,即可能导致编译错误. 注:你的编译器应该承认stlport的源代码并没有配置. 请编辑适当配置头你直接编译,如果你要编译特定配置的变化(见stlport /配置) . 4 )点击"建立/库"子目录. 它含有各种Makefiles中,为不同的编译器和'作出'水电费(使用GNU make和Microsoft的nmake支持) . 如果你找不到合适的Makefile ,为您特定的编译器, 请用一个看起来最相似化妆引擎创建自己的. 核实您可以从命令行编译. IDE中的用户可能要做些特别的, 像添加环境变量(微软)或者安装额外的编译器部件( metrowerks ) 然后才可以使用其命令行编译器(见文档/ readme.xxxx为additionnal inrformation ) . 重要:如果你不打算使用stlport iostreams和/或现场实施,但只是贮运, 你不一定要兴建图书馆. 如果你已决定禁用stlport iostreams与现场使用_stlp_no_iostreams配置宏观stlport /日志/配置/ user_config.h , 你可以停止阅读这里. =====建设stlport iostreams图书馆==========下面是一步一步指示建设stlport溪流图书馆. 这是一个非常普遍建立过程的描述,有更详细的一个检查自述文件在doc文件夹: 5 )采用适当的Makefile中,不 令值班<compiler名称. 麦干净,使值班<compiler名称. 麦安装建设stlport图书馆. Makefiles中的设立旨在建立几个不同的口味调试/ nondebug ,静态/动态版本. 但并不是所有的味道将兴建的默认. 见建立/库/自述建设/库/ readme.options其他作阵. 注:您的"作"程序可能有不同的名称,如" nmake " Visual C++开发而成. 例子: 1 . 如果你正在建设stlport仅一编译 你可以这样做( 1996,1997,1998语法Visual C++开发下文) : nmake / fnmake - vc6.mak清洁nmake / fnmake - vc6.mak安装2 . 如果您计划建立stlport多种编译器,使用"值班" : 令值班gcc.mak清洁装置,使值班sunpro.mak清洁安装注: '安装' 工作目标稍有不同比平时-它安装到图书馆<stlport根dir> / Lib和彬目录,而不是在时间sys 透射电镜目录. 你所能做的系统安装只复制stlport和库文件夹到目的地,你的选择. 例如在Unix平台可以用以下命令: 苏焦油CF和stlport | ( CD /日本/目录/包括; 焦油xf - ) chmod - r一个住宅+ / /目录/包括/ stlport chown受体根:根/ /目录/包括/ stlport (光盘库; 焦油比照- -- exclud 电子=中专--排除腿长cvsignore ) . | ( CD /日本/目录/库; 焦油xf - ) chown受体根:根/ /目录/库/ libstlport出境*注:系统安装是 择,大多数编译器/连接支持搜索包含和思想库把整个文件,只是帮你做 吻合,就如何实现这一目标. 如果你使用交叉编译器,你可以找到图书馆的<stlport根dir> /库/ <target platform>目录. 6 )如果建造失败的话,你可以选择: -试图确定建设; ) -等到别人将提交相应改变,应纳入下一stlpor 笔释放/快照. 如果你修补stlport ,请拿出补丁 https : / / sourceforge.net的/跟踪/ ? 包囊= 76 6246 & group_id = 146814 &功能=浏览 =====连接你的应用与图书馆stlport ========== 7 )检查建设:例子:在Linux和其它声卡: 唯建立/测试/分队值班<compiler名称. 麦安装.. / .. / .. /宾/ stl_unit_test .. / .. / .. /斌/ stl_unit_test - Windows下: 唯建\测试\股nmake / fnmake - <compiler名称. 麦加装CD .. \ .. \ .. \彬stl_unit_test_r50 stl_unit_test_d50 stl_unit_test_stld50 8 )供应的"库"子目录中的图书馆搜索径 四放入预期图书馆的名单图书馆联系. 实例(想象你mytest.cpp在同一目录下这个文件) :与海合会: 政+ - pthread -i./stlport mytest.cpp -l./lib / lstlport与DEC抄送:第一百二十-i./stlport mytest.cpp -l./lib / lstlport孙抄送: CC的金刚山-i./stlport mytest.cpp -l./lib / lstlport…… [ Visual C++的具体] (嵌入式) VC++中,你没有注明是" stlport_xxx.lib "明确, 因为它是自由选择和被迫自动连接的" #语"的编译config文件在stlport /配置/ stl_msvc.h . 适当的版本正在挑选基于/海事[ 04-9队/金刚山[ 04-9期权和_stlp_debug设置. 所有你必须做的是一套图书搜索路径的连接器. 例如: cl.exe /一\ stlport mytest.cpp /连接/ libpath : . \库/海事九日) ,如果你连你的应用与共享stlport库( . 所以还是. DLL文件) ,请 使你的. 所以还是. DLL文件,可以发现的动态连接器. Windows环境下,路径搜索,取决于具体的味道,看到的MSDN文档loadlibrary在http://msdn.microsoft.com . 最简单的方法是要么修改PATH环境变量或复印件. DLL文件的下的可执行文件. Linux环境下,环境变本扩展可以调整,以点迪尔遏制. 看到的是UNIX为ld.so更多信息. 10 ) stlport只有建立线程图书馆,让你的申请应编译为多线程,太. 使用pthread (或pthreads在Solaris )选项海合会-金刚山为sunpro , /吨的VC ,等等. 有时你应该界定_reentrant还是其他什么东西,取决于平台/编译器. 见编译器和连接器的选项从命令行当你建设单元测试(编译/测试/股) ,以供参考. 最后是有用的任何平台(特别注意Windows用户) . 11 )毫不犹豫地阅读readmes (文档/ *自述,建造/库/自述* ,建立/测试/单价/自述* )和DOC /常见问题. 12 )有乐趣!
      

  3.   

    还是英文原文比较好拉,自动翻译的不行**********************************************************************
    *  INSTALL file for STLport 5.0                                   *
    *                                                                    *
    **********************************************************************STLport is a full ANSI C++ Standard library.This distribution contains STLport sources only, no binaries.
    To use STLport iostreams, locale and complex numbers, you have to build STLport
    library from sources in "build/lib" directory and link your programs with it.Starting with 5.0 the 'wrapper' mode is not supported anymore. You cannot use native
    compiler iostreams implementation with STLport STL (see doc/FAQ for explanations).
    Now you have to choose between STLport iostreams or no iostreams.==== Unpacking and installing 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 ;)2) Make sure "stlport" directory of this distribution comes before compiler's one 
       in your include paths when you compile the project.   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.3) Make sure you do not rename this "stlport" subdirectory -
       that may result in compilation errors.   NOTE:  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
              (see stlport/config). 
    4)  Go to "build/lib" subdirectory. It contains various makefiles for different
        compilers and 'make' utilities (GNU Make and Microsoft's nmake supported).
        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.    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 (see doc/README.xxxx for additionnal inrformation).    IMPORTANT:    If you DO NOT plan to use STLport iostreams and/or locale implementation but just
        the STL, you do not have to build the library.
     
        If you have decided to disable STLport iostreams and locale using _STLP_NO_IOSTREAMS
        configuration macro in stlport/stl/config/user_config.h, you may stop reading here.
    ==== Building STLport iostreams library ==========Below are step-by-step instructions to build STLport streams library. This is a general
    build process description, for a more detailed one check README files in the doc folder:5)  Using appropriate makefile, do      make -f <compiler name>.mak clean
          make -f <compiler name>.mak install    to build the STLport libraries. Makefiles are set up to build several different
        flavors - debug/nondebug, static/dynamic versions. But not all flavors will be build
        by default. See build/lib/README and build/lib/README.options for other make tagets.    Note: your "make" program may have different name, like "nmake" for Visual C++.    Examples : 
         1. If you are building STLport for just one compiler, you may do something like that
            (DOS syntax for Visual C++ below):
            nmake /fnmake-vc6.mak clean
            nmake /fnmake-vc6.mak 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
        Note: 'install' target work slightly different than usual - it installs libraries into
        <STLport root dir>/lib and bin catalog, NOT IN SYSTEM CATALOG. You can do the system
        install by just copying stlport and lib folder to the destination of your choise. For
        example on UNIX-like platforms this can be done with the following commands:      su
          tar cf - stlport | (cd /usr/local/include; tar xf -)
          chmod -R a+r /usr/local/include/stlport
          chown -R root:root /usr/local/include/stlport
          (cd lib; tar cf - --exclude=CVS --exclude=.cvsignore .) | (cd /usr/local/lib; tar xf -)
          chown -R root:root /usr/local/lib/libstlport*
          exit    Note: System install is optional, most of compilers/linkers support searching for includes
        and libs throught out the whole filesystem, just check your documentation on how to achieve
        this.    If you use cross-compiler, you can find libraries in the <STLport root dir>/lib/<target platform>
        catalog.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.    In case you do patch STLport, please submit your patches to
        https://sourceforge.net/tracker/?atid=766246&group_id=146814&func=browse==== Linking your application with STLport library ==========7) Check the build:    Example:
        
        - under Linux and other Unixes:    cd build/test/unit
        make -f <compiler name>.mak install
        ../../../bin/stl_unit_test
        ../../../bin-g/stl_unit_test    - under Windows:    cd build\test\unit
        nmake /fnmake-<compiler name>.mak install
        cd ..\..\..\bin
        stl_unit_test_r50
        stl_unit_test_d50
        stl_unit_test_stld508) Supply the "lib" subdirectory to the library search path and add desired 
       library to the list of libraries to link with.
       Examples (imagine you have mytest.cpp in the same directory as this file is):
    With GCC     : g++ -pthread -I./stlport mytest.cpp -L./lib/ -lstlport
    With DEC CC  : cxx -I./stlport mytest.cpp -L./lib/ -lstlport
    With SUN CC  : CC -mt -I./stlport mytest.cpp -L./lib/ -lstlport
    .....
       [ Visual C++ specific ] For (embedded) VC++, you do not have to specify 
       "stlport_XXX.lib" explicitly, as it is being choosen and forced to link 
       automatically by "#pragma"'s in compiler config file in 
       stlport/config/stl_msvc.h. Appropriate version is being selected based on 
       /MD[d] vs /MT[d] options and _STLP_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 /MD9) If you linked your application with shared STLport library (.so or .dll), please 
       make your .so or .dll can be found by the dynamic linker. 
       Under Windows, the paths searched depend on the particular flavor, see the MSDN 
       documentation for LoadLibrary at http://msdn.microsoft.com. Easiest ways are to
       either modify the PATH environment variable or copy all .dll's next to the 
       executable. 
       Under Linux, the environment variable LD_LIBRARY_PATH can be adjusted to point
       to the dir containing. See the manpage for ld.so for more info.10) STLport builds only multithreaded libraries, so your application should be compiled
       as multithreaded, too. Use -pthread (or -pthreads on Solaris) option for GCC, -mt for SunPro,
       /MT for VC, and so on. Sometimes you should define _REENTRANT or something else, depends
       upon platform/compiler. See compiler's and linker's options on command line when you build
       unit tests (build/test/unit) for reference. The last is useful for ANY platform (special
       attention for Windows users).11) Don't hesitate to read READMEs (doc/README*, build/lib/README*, build/test/unit/README*)
       and doc/FAQ.12) Have fun!
      

  4.   

    谢谢各位,我去试试。还有一个问题stlport 5.1.3和4.6.2有什么区别啊
      

  5.   

    To download the latest version of STLport, please be sure to visit
    https://sourceforge.net/project/showfiles.php?group_id=146814
      

  6.   

    新的一般来说是改进了一些特性,或者消除了一些bug,使用上没有区别
      

  7.   

    应该区别比较大,我现在使用的是stlport 5.1.0。如果我没记错的话,新的stlport里面吸收了boost里面的东西,也就是新版本的stlport支持线程安全的stl模板。我记得编译新版本的stlport时可以配置是编译成并发库还是原来的非线程安全的库的。