4 Replies Latest reply on Nov 28, 2011 5:02 PM by Steve.Clamage-Oracle

    lack of libstlport4.so when ldd the program

      Hi,to whom it may concern:

      when I try to ldd program, I found there is a lack of libstlport4.so, so far as I know,I could only get this library through install sun studio, isn't it?

      If I want to get this library without installing sun studio, when can i down this library?

      Can I put this library along with our release?Or do I need any license to do this?
        • 1. Re: lack of libstlport4.so when ldd the program
          I can't tell from your post how you built your program. If you want to use STLport with your program built with Studio C++, you need to add the option
          to every CC command, compiling and linking. The option needs to be used for the entire program, including any C++ shared libraries that you use.

          If you follow that procedure, you should find that libstlport.so.1 is linked to your program. To verify that Studio is correctly installed, try building a "hello world" program:
          % CC hello.cc -library=stlport4
          % ldd a.out | grep stlport
                  libstlport.so.1 =>       /studio/install/directory/.../libstlport.so.1
          Various options can cause the static libstlport.a to be linked instead, accidentally or on purpose. If you still have a problem, please show the complete command line that you used to link the program. (You can abbreviate all the .o files as *.o, but show everything else.)

          One of the files that is installed with Studio lists the libraries that you can freely redistribute with your application. The name and location of that file varies with the version of Studio. For Studio 12.2, the file is
          All versions of Studio allow redistribution of the STLport library.

          For a discussion of best practices in shipping a shared library with your application, please see this series of articles:
          1 person found this helpful
          • 2. Re: lack of libstlport4.so when ldd the program
            Thanks to your reply, and it really helps a lot.And now, our product requires a list of packages, which includes SUNWlibm,SUNWlibms,SUNWsprot,SUNWsprox,SUNWtoo,SUNWi1of,SUNWxwfnt, could you please tell me if the libstlport.so.1 is contained in any of these packages.
            • 3. Re: lack of libstlport4.so when ldd the program

              libstlport.so isn't included in a system package. The library that comes with Oracle Studio can be redistributed freely.

              1 person found this helpful
              • 4. Re: lack of libstlport4.so when ldd the program
                More precisely, libstlport.so.1 is included in a package that is part of the compiler installation. You cannot redistribute those packages.

                You can redistribute the library file (not the package it comes in) as part of your application. The articles I referenced earlier explain exactly how to do that.
                1 person found this helpful