static linkage

Developers
Alex
2007-03-07
2013-05-13
  • Alex

    Alex - 2007-03-07

    Hello,

    My applications (Win32) use DLL version of runtime library, but I want stlport to be linked statically. 

    I faced the DLL hell because have applications compiled both for VS6 and VS8 and it's quite inconvenient because stlport has the same DLL name.

    Is it possible to create stlport 5.1 library for static linkage but the library itself to use threaded DLL runtime library?

    Thank you.

     
    • Alex

      Alex - 2007-03-07

      Hello,

      I found out how to do that:
      configure -c msvc6 --rtl-dynamic

      stlport\stl\config\host.h
      #define _STLP_USE_STATIC_LIB

       
    • Francois Dumont

      Francois Dumont - 2007-03-08

      You could also have kept dlls using naming option like that:

      configure -c msvc6 --lib-motif vc6

      Build the library, it generates:

      stlport_vc6.5.1.lib, stlport_vc6.5.1.dll ...

      configure -c msvc8 --lib-motif vc8

      stlport_vc8.5.1.lib, stlport_vc8.5.1.dll ...

      In stlport/stl/config/user_config.h add

      #if defined (_MSC_VER)
      #  if (_MSC_VER == 1200)
      #    define _STLP_LIB_NAME_MOTIF "vc6"
      #  elif (_MSC_VER == 1400)
      #    define _STLP_LIB_NAME_MOTIF "vc8"
      #  endif
      #endif

       
    • Alex

      Alex - 2007-03-08

      Oh, great.
      Thank you.
      That should be added into the documentation.

       

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks